cypress-tags-example
May 25, 2021 ยท View on GitHub
Demo Cypress project using cypress-tags.
Install
npm install
Run Tests
This suite contains a series of tagged and untagged test cases. They don't do anything, but you can run them using:
npx cypress run
Some of the tests are tagged with tags such as wip, smoke and regression. You can use any string you like as a tag.
Here are some scenarios you can run.
- Run all
wiptests:
CYPRESS_INCLUDE_TAGS=wip npx cypress run
- Run all tests tagged with
smokeorregression:
CYPRESS_INCLUDE_TAGS=smoke,regression npx cypress run
- Run all tests apart from those tagged as
wip:
CYPRESS_EXCLUDE_TAGS=wip npx cypress run
- Run all
smokeorregressiontests but not those marked aswip:
CYPRESS_INCLUDE_TAGS=smoke,regression CYPRESS_EXCLUDE_TAGS=wip npx cypress run
- Run all
smokeandregressiontests:
CYPRESS_INCLUDE_USE_BOOLEAN_AND=true CYPRESS_INCLUDE_TAGS=smoke,regression npx cypress run
- Run all tests but not those marked as
smokeandregression:
CYPRESS_EXCLUDE_USE_BOOLEAN_AND=true CYPRESS_EXCLUDE_TAGS=smoke,regression npx cypress run