npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@kogai/protractor-flake

1.0.5 • Public • Published

Protractor Flake Build Status NPM package Join the chat at https://gitter.im/NickTomlin/protractor-flake

Rerun potentially flakey protractor tests before failing.

This module is still 0.x so please contribute a PR or issue if you encounter any bugs.

npm i protractor-flake
 
# or globally for easier cli usage 
npm i -g protractor-flake

Usage

Via the CLI:

npm i -g protractor-flake
 
# protractor-flake <protractor-flake-options> -- <options to be passed to protractor> 
protractor-flake --node-bin node --max-attempts=3 -- protractor.conf.js

Protractor flake expects protractor to be on $PATH by default, but you can use the --protractor-path argument to point to the protractor executable.

Or programmatically:

var protractorFlake = require('protractor-flake');
 
protractorFlake({
  maxAttempts: 3,
  // expects node to be in path
  // set this to wherever the node bin is located
  nodeBin: 'node',
  protractorArgs: []
}, function (status, output) {
  process.exit(status);
});
 

Caveats

This has not yet been tested with Protractor + Mocha. It should function similarly. Please update with an issue or PR if this is not the case.

Tests will not re-run properly (all tests will run each time) if you use a custom reporter that does not log stacktraces for failed tests. For example, if you are using jasmine-spec-reporter with Jasmine 2.0, make sure to set displayStacktrace: 'specs' or displayStacktrace: 'all'.

Contributors

See CONTRIBUTING.md

install

npm i @kogai/protractor-flake

Downloadsweekly downloads

6

version

1.0.5

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability