Reputation: 11
My entire feature stack is divided into @sanity(10 scenarios) and @smoke(2 scenarios) and whole stack is considered as @regression (no tag required, and total scenarios: 37). My question is how can I pass tag value via command line. Please note this is a cucumber-testng project
Below is how my runner file looks:
Please note, I have tried below command line commands but it still runs @smoke and @sanity both cases (meaning 12 scenarios)
./gradlew -i test -Denv=release -D"cucumber.options=--tags @sanity" ---> It runs 12 scenarios
./gradlew -i test -Denv=release -Dcucumber.filter.tags="@smoke"---> It runs 12 scenarios
Upvotes: 0
Views: 1051
Reputation: 11
So this worked. Apparently I had missed adding below line in my build.gradle file
Upvotes: 0
Reputation: 309
If you want to run the tests from command line only, try removing the tags=@sanity or @smoke
from your runner file first and then try ....-Dcucumber.filter.tags="@smoke"
from the command line again.
Upvotes: 1