Skip to content

A plugin to run cypress cucumber scenarios multiple times

Notifications You must be signed in to change notification settings

manv6/cucumber-cypress-rerun

Repository files navigation

cucumber-cypress-rerun renovate-app badge cypress version

A plugin to run cypress cucumber failed scenarios after run

Read Wrap Cypress Using NPM Module API and Retry, Rerun, Repeat.

Install

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.

Use

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.

Feature files path

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/

Use tags to make it happen

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.

Debugging

Run this script with environment variable DEBUG=cucumber-cypress-rerun to see verbose logs

What about test retries?

This NPM module retries the entire Cypress run, if you need to retry just the failed tests, use the Test Retries.

About

A plugin to run cypress cucumber scenarios multiple times

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published