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

protractor-fail-fast

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protractor-fail-fast

Allow Protractor tests to "fail-fast", exiting on the first failure instead of running all tests no matter what. This can save a great deal of time as Protractor tests are typically slow and expensive.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.5K
increased by6.98%
Maintainers
1
Weekly downloads
 
Created
Source

protractor-fail-fast

Allow Protractor tests to "fail-fast", exiting on the first failure instead of running all tests no matter what. This can save a great deal of time as Protractor tests are typically slow and expensive.

This Protractor plugin is essentially a wrapper around jasmine-fail-fast, solving the problem of halting multiple Protractor instances once one of them has failed. Otherwise, a multi-capability Protractor test will take as long as the longest running test instance, potentially as long as if jasmine-fail-fast wasn't applied at all.

Install

npm install protractor-fail-fast

Usage

In the Protractor conf:

var failFast = require('protractor-fail-fast');

exports.config = {
  plugins: [{
    package: 'protractor-fail-fast'
  }],

  onPrepare: function() {
    jasmine.getEnv().addReporter(failFast.init());
  },
  
  afterLaunch: function() {
    failFast.clean(); // Cleans up the "fail file" (see below)
  }  
}

Fail file

In order to facilitate communication between the test instances (and for the lack of a better known option), protractor-fail-fast writes to an empty file, .protractor-failed, whenever a test fails. The presence of this file triggers all other test instances to skip the rest of their tests.

The init and clean methods will remove this file, but it may still remain if, for example, the afterLaunch Protractor hook isn't executed due to an aborted test run. For that reason, it's recommended to add .protractor-failed to .gitignore.

FAQs

Package last updated on 09 Dec 2015

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