This is a sample project that demonstrates how Stryker .Net can be used to run mutation tests in .Net Core.
To get more information about Stryker, you can view on official website.
- Colect coverage
dotnet test --verbosity minimal --collect:"XPlat Code Coverage"
- Open folder with Guid inside TestResults
reportgenerator "-reports:coverage.cobertura.xml" "-targetdir:coveragereport" -reporttypes:Html
- Open coveragereport folder
- open index.html file
Go to the tests folder location:
cd <repository location>\MutationTestsExample\src\MutationTestsExample.Tests
Install Stryker .NET globally:
dotnet tool install -g dotnet-stryker
Run the mutation tests:
dotnet-stryker
Run the mutation tests only with different file:
dotnet-stryker --diff
Go to the stryker report location:
cd <repository location>\MutationTestsExample\src\MutationTestsExample.Tests\StrykerOutput\<date run report>\reports\mutation-report.html