A plugin to run cypress cucumber failed scenarios after run
Read Wrap Cypress Using NPM Module API and Retry, Rerun, Repeat.
npm i -D cucumber-cypress-rerun
# or using Yarn
yarn add -D cucumber-cypress-rerun
This module assumes the cypress
dependency v10.3.0+ has been installed.
npx cucumber-cypress-rerun run ... rest of "cypress run" arguments
Which will run Cypresss 1
time, exiting after the first failed run or after run finish successfully.
You should pass the feature file folder as argument for the plugin to know where are the feature files
--feature-files <path_to_feature_files> ... rest of "cypress run" arguments
If no argument passed plugin will look for feature files in the default cypress location cypress/e2e/
Add in env arguments the following
-env TAGS=not @wip and <tag>
The plugin will keep the failed scenarios and will replace the selected tag with @failed for the second run to execute only failed ones
if not tags used then all scenarios will run and on the second run an env argument will be passed to filter scenarios by @failed
tag.
Run this script with environment variable DEBUG=cucumber-cypress-rerun
to see verbose logs
This NPM module retries the entire Cypress run, if you need to retry just the failed tests, use the Test Retries.