Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

TestArmada/magellan-early-bail-strategy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️⚠️ DEPRECATED ⚠️⚠️

This project, and it's related TestArmada projects, will no longer be supported. No further work from the owners will be done, and no PRs will be reviewed.

Magellan-Early-Bail-Strategy

Build Status License: MIT codecov

Strategy for Magellan to stop a test suite if test failure ratio exceeds a threshold within a given period.

Important Notes About Versions

Important: testarmada-magellan-early-bail-strategy is only supported by Magellan version 10.1.0 or higher.

What does this executor do

  1. It works as a Magellan strategy to help Magellan make decision when to do what
  2. It tells Magellan when to stop a test suite
  3. It tells Magellan when to stop a test

How To Use

Please follow the following steps:

  1. npm install testarmada-magellan-early-bail-strategy --save
  2. Add following line to your magellan.json (if there isn't a magellan.json please create one under your folder root):
"strategy_bail": "testarmada-magellan-early-bail-strategy"
  1. Or, instead of adding above line in magellan.json, add following argument in your command line
--strategy_bail testarmada-magellan-early-bail-strategy
  1. ./node_modules/.bin/magellan --help to see if you can see the following content printed out
 Strategy-specific (testarmada-magellan-early-bail-strategy)
  --early_bail_threshold=0.1           Ratio of tests that need to fail before we abandon the build
  --early_bail_min_attempts=10         Minimum number of tests that need to run before we apply the bail strategy

Congratulations, you're all set.

Example

To enable this strategy with default threshold

$ ./node_modules/.bin/magellan --strategy_bail testarmada-magellan-early-bail-strategy --test xxx

To enable this strategy with customized threshold

$ ./node_modules/.bin/magellan --strategy_bail testarmada-magellan-early-bail-strategy --early_bail_threshold 0.5 --early_bail_min_attempts 5 --test xxx

License

Documentation in this project is licensed under Creative Commons Attribution 4.0 International License. Full details available at https://creativecommons.org/licenses/by/4.0