For C#
  • Introduction
  • Quickstart
  • Quickstart

    Install Stryker using NuGet.

    1 Install

    To install Stryker.NET on your test project add the following lines to the root of your .csproj file. on your test project.

        <DotNetCliToolReference Include="StrykerMutator.DotNetCoreCli" Version="*" />
        <PackageReference Include="StrykerMutator.DotNetCoreCli" Version="*" />

    After adding the references, install the packages by executing dotnet restore inside the project folder.

    dotnet restore 

    2 Let's kill some mutants

    Stryker.NET to mutation test your project

    dotnet stryker

    3 Configure

    Stryker will always look for a stryker-config.json file in the root of the test project. When found it will use the parameters in the file.

            "files-to-exclude": [
            "excluded-mutations": [
                "Logical operators"

    All the arguments in the configuration are optional.


    In some cases Stryker cannot run without the project-file argument. Specify the name of the referenced project that should be mutated here. Stryker can only mutate one project in a single run. When it finds more references it will use the name in project-file to find the one project to mutate.

    For more information on what these options mean, take a look at the Stryker.NET readme


    All arguments can also be passed through the console.

    dotnet stryker --log-level debug

    Arguments both assigned in the config file and the console will use the value assigned in the console.

    Need help?