'Excluding several different scenarios in cucumber feature file with tags
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
Solution 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)"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Lea2501 |
