Reputation: 2445
In my Cypress / Cucumber JS framework, I have several scenarios that have different tags (@Regression
, @Login
, & @Smoke
, etc.).
I am trying to run all scenarios except those with the @Login
tag.
I am able to run only the @Login
tests with the below command:
npx cypress open --config specPattern=cypress/tests/e2e/*.feature --env tags=@Login
I tried the below 2 commands that I found online, but I'm running into issues with those:
npx cypress open --config specPattern=cypress/tests/e2e/*.feature --env tags=not @Login
Error: Your configFile threw an error from cypress.config.js The error was thrown while executing your e2e.setupNodeEvents() function: Error: empty stack at pop (C:...\node_modules@cucumber\tag-expressions\dist\src\index.js:139:15)
npx cypress open --config specPattern=cypress/tests/e2e/*.feature --env tags=~@Login
This second attempt does open the Cypress Explorer, but it says that no specs were found. Even though I do have tests with tags other than @Login
.
I know I could specify all the other tags, & run it that way, but I instead want to just exclude @Login
tests.
Can someone please point out what I am doing incorrectly?
Upvotes: 0
Views: 867
Reputation: 176
Have you tried putting some quotes around the parameter?
npx cypress open --env tags="not @Login"
Upvotes: 5