Closed BuddyArifin closed 7 years ago
Hi,
I recommend that you download this project and run it as it is from Android Studio, then if that works, have this project and yours side by side to compare classes.
One difference I noticed is in you CucumberTestRunner's onCreate
method, there is a call to start()
at the end, maybe that is causing trouble. See this file for comparison.
Already solved my problem,
first my problem on my Gradle on :app My application id have different name with my package test, fix with change the "testApplicationId" using my package name. Instrument will include all test.
second I created custom rule for create hooks, but cucumber will give me exception if i not call directly @Rule.
third and onCreate() on CucumberTestRunner.
Thanks, for your help
Hey,
I try implement to my project, but still have an error "no test were found, Test running failed: Instrumentation run failed due to 'cucumber.runtime.CucumberException'". I already read this thread #3, but still i cannot solve this error. I would greatly appreciate it if you could tell me what I'm doing wrong
Structure folder
CucumberTestRunner `@Override public void onCreate(final Bundle bundle) { super.onCreate(bundle); final String tags = sea.olxsulley.BuildConfig.TEST_TAGS; if (!tags.isEmpty()) { bundle.putString(CUCUMBER_TAGS_KEY, tags.replaceAll(",", "--").replaceAll("\s", "")); } instrumentationCore.create(bundle); start(); }
CucumberOptions
@CucumberOptions( features ="features", glue = {"sea.pits.cucumber.steps"}, format = {"preety", "html:/data/data/com.app.xxxx/cucumber-reports/html-report", "json:/data/data/com.app.xxxx/cucumber-reports/cucumber.json", "junit:/data/data/com.app.xxxx/cucumber-reports/cucumber.xml" }, tags = {"@login-scenarios"} ) class AllTestSuites { }
Steps ` @Given("^I see the Entrance or On Boarding page$") public void i_see_the_Entrance_or_On_Boarding_page() throws Throwable { // Write code here that turns the phrase above into concrete actions throw new PendingException(); }
Feature File