1

i have several cucumber scenarios with issues (tagged as @issue) on them and others that i plainly want to ignore due to several reasons (tagged as @ignore).

I made a separate jenkins job, that only runs the scenarios that have the "@issue" tag on them, but i want to exclude those from the normal executions jobs, but i also want to exclude the scenarios marked with the "@ignore" tag.

I tried the following with no success, given the following example:

 @tag1 @tag2 @severity=critical @issue @ignore Escenario: Scenario name Given The user is in some place When The user do something Then The user successfully achieved it 

I run with the following command:

mvn clean test -Dcucumber.filter.tags="@tag1 and @tag2 and not @ignore or @issue" 

but i got all test running, even the @ignore and @issue ones

2
  • You may need to add some braces to indicate which clauses go together. Commented Mar 2, 2022 at 22:47
  • So something like @tag1 and @tag2 and not (@ignore or @issue) Commented Mar 2, 2022 at 22:48

1 Answer 1

1

Solved! thanks to M.P.Korstanje

The correct way to use the tags for multiple exclution is this:

mvn clean test -Dcucumber.filter.tags="@tag1 and @tag2 and not (@ignore or @issue)" 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.