Stryker supports several plugins, which are listed below. You can also search npm for the stryker-plugin tag.
Test runner and checker plugins are packaged separately; you should install them yourself. For example, if you want to use the mocha test runner you can run
npm install -D @stryker-mutator/mocha-runner.
Don't worry about plugins if you're just getting started. The needed plugins will be installed when you're following our getting started guide.
A test runner plugin can hook into your test runner support coverage analysis or improve performance. If your test runner isn't listed here, you can probably still use the command test runner.
- Jasmine (@stryker-mutator/jasmine-runner)
- Jest (@stryker-mutator/jest-runner)
- Karma (@stryker-mutator/karma-runner)
- Mocha (@stryker-mutator/mocha-runner)
Web Component Tester(@stryker-mutator/wct-runner) (Removed in v4 of Stryker).
After choosing your test runner plugin, install
A reporter plugin can act on events that happen during the mutation testing process. They should be used to, well, report results, or progress.
Stryker already comes with the most useful reporters included:
- progress: Report progress during mutation testing.
- dots: Report progress as dots during mutation testing.
- clear-text: A clear text report at the end of the mutation testing phase.
- html: An HTML report. See Stryker's own report for an example.
- dashboard: Upload your mutation testing report to the Stryker dashboard. See the dashboard docs for more information.
- event-recorder: Write all events to disk. Useful for debug purposes.
A checker plugin can check a mutant before it is mutation tested. The check can fail or pass; when a check fails, the mutant is not mutation tested.
- TypeScript (@stryker-mutator/typescript-checker): This checker will check each mutant for typescript compile errors.
You can write your plugins for Stryker. Interested? Have a look at our create a plugin guide.