serenity-bdd/serenity-cucumber-starter

Not able to run the selected scenarios using tags.

Opened this issue · 7 comments

Hi Team,

I am trying to run the selected scenarios using tags from command line but its triggering all the test suites.
I am using the below tag
mvn clean verify -P UatEllipse -P local -Dcucumber.options="--tags @SVRegression"

Please help me to resolve this issue.

Thanks,
Chakri

@ChakravarthiS tags needs to be passed like this
-Dcucumber.filter.tags="(@tagName)"

Hope this helps

@wakaleo @mayank-kapoor
Filter tags is not working now :
On trying with -Dcucumber.filter.tags="@TagName" runs ZERO scenarios where as on using older way -Dcucumber.options ="--tags " ALL scenarios gets executed . Without filtering tags it makes it hard to run specific tests in runtime

@rakeshhp have you tried -Dcucumber.options="--tags=@" ? Sorry but are you using maven as a build tool ?

ref: https://serenity-bdd.github.io/theserenitybook/latest/filtering-reports.html

Yes using maven build tool ,serenity-cucumber6 , serenity.version 2.3.33,
As @ChakravarthiS pointed above and I have tried both ways cucumber.filter.tags and cucumber.options , it doesn't filter the suite.

Do we have a solution for this issue. I am also facing the same issue. Please help is we have a solution for this.

-Dcucumber.options='--tags @TagName' = Runs all the scenarios
-Dcucumber.filter.tags="@TagName" = Giving error while building
unexpected token : @

Using Serenity2.5.1 and Cucumber 1.0.0.202

use the below format - it works (tested in 3.1.15 version)

mvn verify -Dcucumber.filter.tags="@Help" - this will run only the specific test

mvn verify -Dcucumber.filter.tags="@Help or @test" - this will run the combination of test

mvn verify -Dcucumber.filter.tags="@Help and not @flaky" if you want to ignore the test then use "not"

Something like this should work with the latest versions of Serenity and Cucumber:

mvn clean verify -Dcucumber.filter.tags="@smoke"