Dcucumber.options how to have multiple tags

I am trying to run cucumber tests using maven with the following command

mvn test -Dcucumber.options="--tag @debug1" 

This command works fine, however if I try something like the following, I get an error

 mvn test -Dcucumber.options="--tag @debug1 @debug2" 

Is there a way to pass multiple tag names with cucumber runtime parameters?

+13
maven cucumber-jvm
source share
2 answers

To run scripts with @debug1 and @debug2 :

 mvn test -Dcucumber.options="--tags @debug1 --tags @debug2" 

To run scripts with @debug1 or @debug2 :

 mvn test -Dcucumber.options="--tags @debug1,@debug2" 
+40
source share

A bit late for the party, but I'm using something like:

 mvn test -D tags="debug1 and debug2" 

I'm on the cucumber 2.4.

The @ character is required. You can use tags Maven property. And you can use logical logic to connect multiple tags - white papers .

Slightly reduces the number of typed texts.

+2
source share

All Articles