⚠ You are currently looking at the V1.0 branch. We are working towards the next big release. All new features will be merged here. For currently released sources and for providing fixes see master
Professor X: For someone who hates mutants... you certainly keep some strange company. William Stryker: Oh, they serve their purpose... as long as they can be controlled.
Stryker offers mutation testing for your .NET Core and .NET Framework projects. It allows you to test your tests by temporarily inserting bugs in your source code
Stryker is installed using NuGet as a dotnet core tool
dotnet tool install -g dotnet-stryker
Starting from dotnet core 3.0 dotnet tools can also be installed on a project level. This requires the following steps:
Create a file called dotnet-tools.json in your project folder
dotnet new tool-manifest
Then install stryker without the -g flag by executing the following command in the project folder
dotnet tool install dotnet-stryker
dotnet-tools.json file into source control
Now the rest of your team can install or update stryker with the following command:
dotnet tool restore
Now you can run stryker from your test project directory by executing:
Dotnet tools do not auto update so you are responsible for making sure you're up-to-date. To help with this stryker will notify you when a new version is available
To update stryker as a global tool run
dotnet tool update --global dotnet-stryker
To update stryker as a project tool run
dotnet tool update --local dotnet-stryker or change the version in the
dotnet-tools.json file. Then check in the updated
For the full documentation on how to use Stryker.NET, see our configuration docs
Runs on test projects targeting:
Dotnet core runtime 3.1+ needs to be available on your system to run dotnet stryker.
For .NET Framework projects, Stryker.NET requires nuget.exe to be installed on your system. Please follow their installation instructions.
Right now, Stryker.NET supports the following mutations:
For the full list of all available mutations, see the mutator docs.
For the full list of all available reporters, see the reporter docs.
Want to help develop Stryker.NET? Check out our contribution guide.
Issues for the HTML report should be issued at https://github.com/stryker-mutator/mutation-testing-elements