0.3.5 • Published 5 years ago

protractor-junit-flake v0.3.5

Weekly downloads
1,657
License
ISC
Repository
github
Last release
5 years ago

Protractor Junit Flake

Rerun potentially flakey protractor tests before failing (Based on Junit XML). Runs only the specific failing test using jasmine's spec filter functionality.

npm i protractor-junit-flake

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

Usage

Via the CLI:

npm i -g protractor-junit-flake

# protractor-junit-flake <protractor-junit-flake-options> -- <options to be passed to protractor>
protractor-junit-flake --results-xml-path=path/to/results-*.xml  --max-attempts=3 -- path/to/protractor.conf.js

See src/parse-options.js for the full list of command line options.

Protractor Junit 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-junit-flake');

// Default Options
protractorFlake({
  resultsXmlPath: 'test/results/protractor-*.xml'
}, function (status, output) {
  proces.exit(status)
})

// Full Options
protractorFlake({
  protractorPath: '/path/to/protractor',
  maxAttempts: 3,
  resultsXmlPath: 'test/results/protractor-*.xml'
  // expects node to be in path
  // set this to wherever the node bin is located
  nodeBin: 'node',
  // set color to one of the colors available at 'chalk' - https://github.com/chalk/ansi-styles#colors
  color: 'magenta',
  protractorArgs: []
}, function (status, output) {
  process.exit(status);
});
0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago