serenity-bdd / serenity-cucumber

Cucumber integration for the Serenity BDD Reporting library
Other
78 stars 74 forks source link

How to run tag wise Scenario Outline ?? #204

Closed sifulovi closed 3 years ago

sifulovi commented 5 years ago

My code is

@WithTags({@WithTag("Login")}) @CucumberOptions( format = { "pretty" }, glue = {"starter.stepdefinitions"}, features = {"src/test/resources/features"}

) I have two tags @login, @CBC, I want to run @Login before @CBC but it all time run with firstly @CBC then @Login.(@WithTags is not working :( )

image

here is my features files structure,

wakaleo commented 5 years ago

@WithTags is for JUnit, not Cucumber - see the Cucumber docs to see how to define tags in the @CucumberOptions parameters. But you cannot control the order of execution of feature files using tags - feature files (and scenarios) are meant to be independent, so your Create-Blog-Category.feature should not depend on the login.feature to work (feature files are not test scripts). Each scenario needs to be independent. See https://johnfergusonsmart.com/1136-2/.