I have a large suite of feature files, and every single scenario is tagged @regression. After running full regression I realized that some features do not need to be run for the current environment. What is the best approach to ignore specific scenarios keeping in mind that each scenario is tagged with @regression?
Asked
Active
Viewed 5,379 times
1
-
3Add a new tag that describes the environment such as dev or qa etc etc. Add them to the feature file at the top level or scenario level. change ur runner filter to tags = { "regression and dev"} etc etc – Grasshopper Feb 21 '19 at 13:04
-
Thanks. Added "@ignoreDev" tag next to "@regression" tag. And Runner file looks like {"@Regression", "~@ignoreDev "} This worked for my scenario. Now it'll will run everything with regression tag but ignore if "@ignoreDev" is in there. – Harry Feb 22 '19 at 17:45
1 Answers
2
You can use Tags to run certain features/scenarios, or not run them.
To specifically ignore them, see Ignoring a subset of scenarios:
"You can tell Cucumber to ignore scenarios with a particular tag:
Using JUnit runner class:
@CucumberOptions(tags = "not @smoke")
public class RunCucumberTest {}
"

Marit
- 2,399
- 18
- 27