Getting started
Stryker4s is a mutation testing framework for Scala. It allows you to test your tests by temporarily inserting bugs.
This guide is for the sbt plugin for Stryker4s.
Stryker4s also has plugins for other build tools. See the README for setup instructions for the Mill plugin and the Maven plugin. Configuration is shared across all plugins.
1 Install​
To install Stryker4s on your project, add the following line to project/plugins.sbt :
addSbtPlugin("io.stryker-mutator" % "sbt-stryker4s" % stryker4sVersion)
2 Configure​
Stryker4s can be configured in multiple ways. You can use sbt settings, a configuration file, or command-line arguments. Stryker4s will set defaults for some values, and retrieve project information from your sbt build for others. For more information on how to configure Stryker4s, visit our configuration page.
3 Let's kill some mutants​
Run Stryker4s to mutation test your project:
sbt stryker
Or on multi-module projects:
sbt <module-name>/stryker
On Mill, run ./mill <module>.stryker; on Maven, run mvn stryker4s:run. See the README for the full setup of those plugins.
4 Having trouble?​
Are you having troubles? Try enabling debug logging. For more information on how to enable debug logging visit our configuration page. If you are having issues, please let us know by reporting an issue or talk to us on Slack.