Cucumber 选项(命令行)不再适用于较新版本的 Cucumber (io.cucumber)?
Cucumber options (Command line) no longer works with newer version of cucumber (io.cucumber)?
当前,当尝试通过命令行 运行 进行测试时,以下命令会起作用 window 但是自从 info.cakes 更新到 io.cucumber 后,它似乎不再起作用?
mvn test -Dcucumber.options="--tags @login"
异常消息:
Sep 17, 2019 5:18:37 PM cucumber.runtime.FeaturePathFeatureSupplier get
WARNING: No features found at classpath:runners
然而 运行ning 测试直接来自 运行ner class 作品:
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>4.7.2</cucumber.version>
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import org.junit.runner.RunWith;
您正在混合使用 JUnit 和 TestNG。您应该在单个 class 中使用 JUnit 或 TestNG。两者都不是。
当前,当尝试通过命令行 运行 进行测试时,以下命令会起作用 window 但是自从 info.cakes 更新到 io.cucumber 后,它似乎不再起作用?
mvn test -Dcucumber.options="--tags @login"
异常消息:
Sep 17, 2019 5:18:37 PM cucumber.runtime.FeaturePathFeatureSupplier get
WARNING: No features found at classpath:runners
然而 运行ning 测试直接来自 运行ner class 作品:
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>4.7.2</cucumber.version>
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import org.junit.runner.RunWith;
您正在混合使用 JUnit 和 TestNG。您应该在单个 class 中使用 JUnit 或 TestNG。两者都不是。