Reputation: 1087
Currently the following command would work when attempting to run tests via the command line window however since updating to io.cucumber from info.cakes it no longer seems to work?
mvn test -Dcucumber.options="--tags @login"
Exception message:
Sep 17, 2019 5:18:37 PM cucumber.runtime.FeaturePathFeatureSupplier get
WARNING: No features found at classpath:runners
However running tests directly from the runner class works:
package runners;
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(features = { "classpath:features" }, glue = {
"stepDefinitions"}, monochrome = true, tags = {"@login"}, dryRun = false,
plugin = { "pretty", "html:target/cucumber", "json:target/cucumber.json"})
public class MainRunner extends AbstractTestNGCucumberTests {
}
Cucumber version:
<cucumber.version>4.7.2</cucumber.version>
Upvotes: 0
Views: 564
Reputation: 12039
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import org.junit.runner.RunWith;
You are mixing JUnit and TestNG. You should in a single class use either JUnit or TestNG. Not both.
Upvotes: 1