Stryker.NET
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.
Introduction
For an introduction to mutation testing and Stryker's features, see stryker-mutator.io. Looking for mutation testing in JavaScript?
Getting started
Stryker.NET offers you mutation testing for your .NET Core projects. It allows you to test your tests by temporarily inserting bugs. Stryker.NET is installed using NuGet.
Install
To install Stryker.NET on your test project add the following lines to the root of your .csproj
file. on your test project.
<ItemGroup>
<DotNetCliToolReference Include="StrykerMutator.DotNetCoreCli" Version="*" />
<PackageReference Include="StrykerMutator.DotNetCoreCli" Version="*" />
</ItemGroup>
After adding the references, install the packages by executing dotnet restore
inside the project folder.
Usage
Stryker.NET can be used by executing the dotnet stryker
command inside your test project folder, using the Stryker.CLI package.
For the full documentation on how to use Stryker.NET, see the Stryker.CLI readme.
Compatibility
Only compatible with .NET Core version 1.1+
Supported Mutators
Right now, Stryker.NET supports the following mutators:
- Binary Operators
- Boolean Substitutions
- Assignment Mutator
- Unary Operators
- Update Operators
- Checked Mutator
For the full list of all available mutators, see the Stryker.Core readme.
Contributing
Want to help develop Stryker.NET? Check out our contribution guide.