How to setup and run cucumber bdd test for android project in intellij 13.1.4 using cucumber-java

Intellij IDE supports cucumber natively. But the problem is I am trying  to create and run a cucumber test on an android projects in intellij  13.1.4 IDE. After much research I came across this tutorial. But after following it and running my test I get this results

package com.test.cucumbertest.app;

import android.test.ActivityInstrumentationTestCase2;
import cucumber.api.PendingException;
import cucumber.api.java.en.Given;

public class MyStepDefs extends ActivityInstrumentationTestCase2<MainActivity>{
    public MyStepDefs() {
        super(MainActivity.class);
    }
    @Given("^I have lunch the app$")
    public void I_have_lunch_the_app() throws Throwable {
        // Express the Regexp above with the code you wish you had
        assertTrue(true);
    } 

}


the contents of RunTest

package com.test.cucumbertest.app;

import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(format = {"pretty", "html:report"})
public class RunTest {

}


testclass.feature

Feature: Test BDD
  Scenario: Scenario One
    Given I have lunch the app


i run the test by runing RunTest and Android Test

Please sign in to leave a comment.