Cypress -Grouping Test scenario's or Test suite
We used to maintain and Execute Smoke test, functional test and Regression Test. In Cypress we can be able to achieve with title or Tags to execute specific test cases and test suite using grep plugin.
Step 5: Group Run by using
grep title
#run
only the tests with "smoke" in the title
npx Cypress run npx cypress
run --headless --browser chrome --spec cypress\integration\Group\* --env
grep="Smoke"
#run
only the tests with "smoke; Functional" in the
title
npx Cypress run npx cypress
run --headless --browser chrome --spec cypress\integration\Group\* --env
grep="Smoke;Functional"
Step 6: Group Run by using
grep tags
#
run
tests tagged @smoke or @Functional
npx Cypress run npx cypress run --headless --browser chrome --spec cypress\integration\Group\* --env grepTags="Smoke Functional"
# run tests tagged @smoke and @Functional
npx Cypress run npx cypress
run --headless --browser chrome --spec cypress\integration\Group\* --env
grepTags="Smoke+Functional"
# run tests untagged @-Functional
npx
Cypress run npx cypress run --headless --browser chrome --spec
cypress\integration\Group\* --env grepTags="-Functional"
No comments:
Post a Comment