Stryker 0.8 release
Stryker 0.8 just released with better CI integration and configurable thresholds.
For the entire changelog per package:
- stryker changelog
- stryker-api changelog
- stryker-html-reporter changelog
- stryker-mocha-runner changelog
- stryker-mocha-framework changelog
Better CI integrationโ
It's now possible to let your build fail based on your mutation score.
The way to do this is to make sure stryker runs inside your (nightly) build and configure the threshold.break
value:
// stryker.conf.js
// ...
thresholds: {
break: 70, // Fail if mutation score < 70
// ..
}
// ...
This will break the build if your mutation score falls below 70%.
[2017-08-11 13:46:10.190] [ERROR] ScoreResultCalculator - Final mutation score 66.97 under breaking threshold 70, setting exit code to 1 (failure).
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] stryker: `node bin/stryker run`
Want to know what a 'mutation score' is? See our faq.
Configurable color thresholdsโ
The clear-text and html reporters now honor configured high and low thresholds.
You once again configure it using the thresholds
config option:
// stryker.conf.js
// ...
thresholds: {
high: 80,
low: 60,
// ...
}
// ...
Configuring these values will color mutation scores above 80% green, between 80 and 60% yellow and anything below 60% red. You can see an example of an html report based on stryker itself here.
Bugfixesโ
Bugfixes this release:
- Incorrect relative path for html reporter #355
- Mutation testing in node based environments can generate false warnings #350
Enjoy!โ
Enjoy this new release! We're always happy with feedback, negative or positive.