I am trying run cucumber tests using maven with following command
mvn test -Dcucumber.options="--tag @debug1"
This command works fine, however if i try something like following, i get error
mvn test -Dcucumber.options="--tag @debug1 @debug2"
Is there a way to pass in multiple tag names with cucumber run-time options?
To run scenarios with @debug1
and @debug2
:
mvn test -Dcucumber.options="--tags @debug1 --tags @debug2"
To run scenarios with @debug1
or @debug2
:
mvn test -Dcucumber.options="--tags @debug1,@debug2"
Little late to the party, but I am using something like:
mvn test -D tags="debug1 and debug2"
I am on Cucumber 2.4.
The @
symbol is optional. You can use a tags
Maven property. And you can use boolean logic to hook up multiple tags - official docs.
Reduces the amount of typing little bit.
来源:https://stackoverflow.com/questions/34538571/dcucumber-options-how-to-have-multiple-tags