Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-plugin-retries

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-plugin-retries

Cypress plugin allowing tests to retry a configurable amount of times

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.1K
decreased by-14.24%
Maintainers
1
Weekly downloads
 
Created
Source

cypress-plugin-retries beta

A Cypress plugin to retry failed tests

:warning: this module is in beta, and might cause some strange failures. Please report bugs in the issues of this repo.

Note: please refer to this issue for updates about official cypress retry support

Installation

Add the plugin to devDependencies

npm install -D cypress-plugin-retries

At the top of cypress/support/index.js:

require('cypress-plugin-retries')

Usage

[Preferred] On a per-test or per-hook basis, set the retry number:

Note: this plugin adds Cypress.currentTest and you should only use it if you're using this plugin.

Cypress.currentTest.retries(2)

or Use the environment variable CYPRESS_RETRIES to set the retry number for all spec files:

CYPRESS_RETRIES=2 npm run cypress

or Use Cypress.env('RETRIES') in your spec file to set the retry number for all tests:

Cypress.env('RETRIES', 2)

or [undersirable] Use mocha's this.retries(n) inside of a test:

Note: must use function() notation, not arrows ()=>{}

it('test', function() {
    this.retries(2)
})

License

MIT

Keywords

FAQs

Package last updated on 15 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc