0

In cucumber tests, I want to skip some feature files without changing feature files, such as adding additional tags. Though tags can exclude feature files to run, I can't modify those files. Is there a way to configure in maven pom.xml? Or can I use @CucumberOptions with special features parameters?

Changing feature files will affect other git branches. So I want other way to exclude feature files rather than modifying feature files directly.

One way is to use a Maven plugin to generate a Junit Runner Class for each feature file. Then with maven-failsafe-plugin we can specify exclusions or inclusions to exclude or include those Junit Runner Classes.

niaomingjian
  • 3,472
  • 8
  • 43
  • 78
  • Possible duplicate of [How to ignore particular scenario in cucumber?](https://stackoverflow.com/questions/34655222/how-to-ignore-particular-scenario-in-cucumber) – orde Jun 05 '19 at 02:26

1 Answers1

0

You can tell Cucumber to ignore scenarios with a particular tag. See the docs.

Since that is the way to do it in Cucumber, could you explain why you are looking for a different way? What is it you are trying to accomplish?

Marit
  • 2,399
  • 18
  • 27