Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

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

$
0
0

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

 

Running testsTest running 
startedTest 
running failed:Unable to find instrumentation info for:ComponentInfo{com.test.cucumbertest.apptest/cucumber.api.android.CucumberInstrumentation}Empty test suite.

this is my folder structure

Screenshot from 2014-09-12 14:47:27.png

 

the content if MyStepsDefs is

 

package com.test.cucumbertest.app; import android.test.ActivityInstrumentationTestCase2;import cucumber.api.PendingException;import cucumber.api.java.en.Given; publicclass MyStepDefs extends ActivityInstrumentationTestCase2<MainActivity>{    public MyStepDefs() {        super(MainActivity.class);    }    @Given("^I have lunch the app$")    publicvoid 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"})publicclass 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


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>