All Projects → NickTomlin → protractor-flake

NickTomlin / protractor-flake

Licence: MIT license
Rerun potentially flakey protractor tests before failing.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to protractor-flake

Codeceptjs
Supercharged End 2 End Testing Framework for NodeJS
Stars: ✭ 3,592 (+4280.49%)
Mutual labels:  protractor, end-to-end-testing
protractor-starter
#archived: protractor-starter end-to-end tests setup also for non angular application
Stars: ✭ 37 (-54.88%)
Mutual labels:  protractor, end-to-end-testing
Bxbot Ui Angular
An Angular app for administering BX-bot.
Stars: ✭ 21 (-74.39%)
Mutual labels:  protractor
protractor-element-extend
Module, that helps you to extend ElementFinder in your own custom fragments
Stars: ✭ 22 (-73.17%)
Mutual labels:  protractor
Generator Jhipster Ionic
Ionic for JHipster 💥
Stars: ✭ 147 (+79.27%)
Mutual labels:  protractor
Protractor
E2E test framework for Angular apps
Stars: ✭ 8,792 (+10621.95%)
Mutual labels:  protractor
Protractor Cucumber Typescript
e2e kickstarter test framework which consists of protractor, cucumber frameworks using typescript lang!
Stars: ✭ 194 (+136.59%)
Mutual labels:  protractor
Protractor Firefox Support
Custom implementation of Actions class functions for e2e testing with Protractor in Firefox
Stars: ✭ 20 (-75.61%)
Mutual labels:  protractor
pytest-kind
Mirror of pytest-kind: Test your Python Kubernetes app/operator end-to-end with kind and pytest
Stars: ✭ 16 (-80.49%)
Mutual labels:  end-to-end-testing
Kakunin
An E2E testing framework
Stars: ✭ 141 (+71.95%)
Mutual labels:  protractor
proxy-scraper
⭐️ A proxy scraper made using Protractor | Proxy list Updates every three hour 🔥
Stars: ✭ 201 (+145.12%)
Mutual labels:  protractor
Query Selector Shadow Dom
querySelector that can pierce Shadow DOM roots without knowing the path through nested shadow roots. Useful for automated testing of Web Components. Production use is not advised, this is for test environments/tools such as Web Driver, Playwright, Puppeteer
Stars: ✭ 115 (+40.24%)
Mutual labels:  protractor
Docker Protractor Headless
Protractor end to end testing for AngularJS - dockerised and headless with real Chrome.
Stars: ✭ 90 (+9.76%)
Mutual labels:  protractor
Jasmine Spec Reporter
Real time console spec reporter for jasmine testing framework
Stars: ✭ 241 (+193.9%)
Mutual labels:  protractor
Protractor Best Practices
Stars: ✭ 65 (-20.73%)
Mutual labels:  protractor
emaile2e-javascript-client
Test email integration with your app using MailSlurp
Stars: ✭ 14 (-82.93%)
Mutual labels:  end-to-end-testing
Angular Webpack Starter
A complete Angular 6 and Webpack 4 starter seed with minimal and full featured branches. Full featured branch includes: Material Design 2 (Bootstrap 4 branch available as well), @ngrx, HMR, DLLs and optional use of Universal for server-side rendering - Supports AOT (offline) compilation, sync and lazy loading. Karma/Protractor for e2e/unit tests.
Stars: ✭ 911 (+1010.98%)
Mutual labels:  protractor
Protractor Net
The .NET port of Protractor, an E2E test framework for Angular apps
Stars: ✭ 113 (+37.8%)
Mutual labels:  protractor
Protractor Cucumber Framework
Cucumber framework plugin for Protractor
Stars: ✭ 191 (+132.93%)
Mutual labels:  protractor
meazure
Screen magnification, measurement, capture and color sampling for Windows.
Stars: ✭ 55 (-32.93%)
Mutual labels:  protractor

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

Rerun potentially flakey protractor tests before failing.

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 --parser standard  --max-attempts=3 -- path/to/protractor.conf.js

See src/options.ts for the full list of command line options.

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:

// using commonjs:
var protractorFlake = require('protractor-flake')
// OR using es6 modules/typescript
import protractorFlake = require('protractor-flake')

// Default Options
protractorFlake({
  parser: 'standard'
}, function (status, output) {
  process.exit(status)
})

// Full Options
protractorFlake({
  protractorPath: '/path/to/protractor',
  maxAttempts: 3,
  parser: 'standard',
  // 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: [],
  // specify a different protractor config to apply after the first execution attempt
  // either specify a config file, or cli args (ex. --capabilities.browser=chrome)
  protractorRetryConfig: 'path/to/<protractor-retry-config>.js' 
}, function (status, output) {
  process.exit(status)
})

Parsers

Protractor flake defaults to using the standard parser, which will typically pick up failures run from non-sharded/multi-capability test runs using Jasmine 1 + 2 and Mocha.

There are a few other ways that you can customize your parsing:

  • overriding this with the parser option, specifying one of the built in parsers.
  • providing a path to a module (e.g. /my/module.js or ./module.js) that exports a parser
  • a parser (if used programatically)

Parsers should be defined as an object with a parse method (and optionally a name property):

module.exports = {
  name: 'my-custom-parser',
  parse (protractorTestOutput) {
    let failedSpecs = new Set()
    // ... analyze protractor test output
    // ... and add to specFiles
    failedSpecs.add('path/to/failed/specfile')

    // specFiles to be re-run by protractor-flake
    // if an empty array is returned, all specs will be re-run
    return [...failedSpecs]
  }
}
import Parser from 'protractor-flake/lib/parsers/parser'

const MyParser: Parser = {
  name: 'my-custom-parser',
  parse (protractorTestOutput) {
    let failedSpecs = new Set()
    // ... analyze protractor test output
    // ... and add to specFiles
    failedSpecs.add('path/to/failed/specfile')

    // specFiles to be re-run by protractor-flake
    // if an empty array is returned, all specs will be re-run
    return [...failedSpecs]
  }
}

exports = MyParser

Parser documentation

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].