Skip to main content

Plugins

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.

Test runners​

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.

Removed:

After choosing your test runner plugin, install

Reporters​

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.
  • json: Outputs a JSON file with all mutation test run info of the last run according to the mutation testing report schema.

Checkers​

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.

Ignorers​

With an ignore-plugin, you can ignore all mutants in a specific a code pattern. See using an ignore-plugin for more information.

<Your plugin here>​

You can write your plugins for Stryker. Interested? Have a look at our create a plugin guide.