Skip to main content

Tags

Tags are used to select which test should run using the tag’s expression

Each Feature file consists of multiple Scenarios and to run any particular test case, tags can be used.

Command used to run test cases with a tag is “npx cypress run --env TAGS=\"@(tag name)\" --config-file cdt.config.js"

for example to run scenarios with the tag “sanity”:

Command: npx cypress run --env TAGS=\"@sanity\" --config-file cdt.config.j

The output would be :

References:

Was this page helpful?