Java 如何运行多个Cumber功能?
我有一个这样的运行测试类Java 如何运行多个Cumber功能?,java,selenium,cucumber,Java,Selenium,Cucumber,我有一个这样的运行测试类 @RunWith(Cucumber.class) @CucumberOptions( features = {"src/test/resources/features"}, glue = {"classpath:com.wirecard.step"}, format = {"pretty", "html:target/cucumber-report", "json:target/cucumber.json"},
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"src/test/resources/features"},
glue = {"classpath:com.wirecard.step"},
format = {"pretty", "html:target/cucumber-report", "json:target/cucumber.json"},
tags = {"@Login_Flow", "@Merch_Creation", "@Add_Terminal", "@MERCHBATCH_UPLOAD"}
)
public class AsortStdTests {
}
我在src/test/resources/features下有4个cucumber特性文件。当我尝试运行此测试(4个cucumber特性)时,出现了错误:
None of the features at [src/test/resources/features] matched the filters: [@Login_Flow, @Merch_Creation, @Add_Terminal, @MERCHBATCH_UPLOAD]
0 Scenarios
0 Steps
0m0.000s
Process finished with exit code 0
Empty test suite.
我试着给Cucumber选项一个完整的路径,但效果不太好。有人能帮我吗?谢谢。cucumberoptions中标记的值不正确,当前设置为使用所有提到的标记拾取场景。您正在使用AND而不是OR 您可以完全省略标记选项 或者您可以将此用于标记选项--tags={“@Login\u Flow、@Merch\u Creation、@Add\u Terminal、@MERCHBATCH\u UPLOAD”}