Home > Net >  How to run multiple tags in CucumberOptions
How to run multiple tags in CucumberOptions

Time:06-26

I've two different feature files 1 has @Feature1 and 2 has @Feature2 I want to run only these two features with tags My TestRunner code this gives sytnax error on tags

@RunWith(Cucumber.class)
@CucumberOptions(
        features = "src/main/resources/features",
        glue = "stepDefinition",
        tags = {"@Feature1", "@Feature2"}
)

CodePudding user response:

To execute multiple tag one after another you need to use or . See example below

tags={“@tag1 or @tag2”}
  • Related