/stryker-net

Mutation testing for .NET. Work in progess...

Primary LanguageC#Apache License 2.0Apache-2.0

Nuget Nuget

Build Status Gitter Waffle.io - Columns and their card count

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+

Dotnet core runtime 2.1 needs to be available on your system to run dotnet stryker

Supported Mutators

Right now, Stryker.NET supports the following mutations:

  • Arithmetic Operators
  • Equality Operators
  • Boolean Literals
  • Assignment statements
  • Unary Operators
  • Update Operators
  • Checked Statements
  • Linq Methods
  • String Literals

For the full list of all available mutations, see the Stryker.Core readme.

Contributing

Want to help develop Stryker.NET? Check out our contribution guide.