Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/367.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何运行多个Cumber功能?_Java_Selenium_Cucumber - Fatal编程技术网

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”}