我正在尝试使用带有以下命令的 maven 运行 cucumber 测试
mvn test -Dcucumber.options="--tag @debug1"
此命令工作正常,但是如果我尝试以下操作,我会收到错误
mvn test -Dcucumber.options="--tag @debug1 @debug2"
有没有办法通过 cucumber 运行时选项传递多个标签名称?
最佳答案
对我来说, 的工作原理是什么?万无一失的插件 :
mvn clean test -D"cucumber.filter.tags=@tag1 or @tag2"
当我尝试使用此版本时:mvn clean test -Dcucumber.filter.tags="not @MyTag"
我得到了这个异常(exception):io.cucumber.core.exception.CucumberException: Failed to parse 'cucumber.filter.tags' with value '"not @MyTag"'
Caused by: io.cucumber.tagexpressions.TagExpressionException: Tag expression '"not @MyTag"' could not be parsed because of syntax error: expected operator
关于maven - Dcucumber.options,如何有多个标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34538571/