I am trying to invoke cucumber from a Spring boot app. I have all the dependencies in my gradle build file. compile("info.cukes:cucumber-java8:1.2.5") compile("info.cukes:cucumber-junit:1.2.5") compile("info.cukes:cucumber-spring:1.2.5") And on examing my app's spring boot jar, I see the cucumber jars.
In the main class I have
String[] cucumberOptions = new String[]{"--glue","mypackage.steps","--plugin", "pretty",
"--plugin", "html:target/cucumber-html-report","--plugin", "json:target/cucumber.json",
"--plugin", "junit:target_junit/cucumber.xml",
"classpath:mypackage.features"
};
cucumber.api.cli.Main.main(cucumberOptions );
On executing my jar, I get the error - No backends were found. Please make sure you have a backend module on your CLASSPATH.
I also have a runner class and corresponding step classes. I have my step classes with the following annotation-
@ContextConfiguration(
loader = SpringApplicationContextLoader.class,
classes={Application.class})
@RunWith(SpringJUnit4ClassRunner.class)
public class MySteps{
....
}
My runner class is below.
@RunWith(Cucumber.class)
public class MyRunner{
}
Question - is how do I invoke cucumber from my Spring boot app?