Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Passing multiple cucumber tags to maven task

Shash March 9, 2018


I have a maven task configured and I'm able to pass -Dcucumber.options to it.


-Dbrowser=chrome -Denv=QA "-Dcucumber.options=--tags @SANITY" clean verify


how do you i pass multiple tags? I tried

"-Dcucumber.options=--tags @SANITY --tags @SANITY1" but the plan says

Running RunTest
None of the features at [classpath:features] matched the filters: [@SANITY, @SANITY1]

2 answers

0 votes
Maria Nasir February 1, 2022


$ mvn clean verify  -Dcucumber.filter.tags="@sanity1 and @sanity2"




0 votes
Alan Parkinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2018

Hi Shash

Do any of your Scenarios have both the "@SANITY" and "@SANTIY1" tags at the same time. The Cucumber options expressions you have specified is using a logical AND on the tags. A logical OR would be "-Dcucumber.options=--tags @SANITY,@SANITY1", notice the comma separating the tags



Maria Nasir February 1, 2022

I was able to do this. But my features with ignore tags are also executing.

How can i resolve that problem?

Maria Nasir February 1, 2022

mvn clean verify  -Dcucumber.filter.tags="@sanity and @vG and ~@ignore"


Maybe something like this. But this isn't working

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events