Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.44 KB

README.md

File metadata and controls

64 lines (43 loc) · 1.44 KB

Mutation Tests Example

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.

Project Dependencies

Generate coverage report

  1. Colect coverage
dotnet test --verbosity minimal --collect:"XPlat Code Coverage"
  1. Open folder with Guid inside TestResults
reportgenerator "-reports:coverage.cobertura.xml" "-targetdir:coveragereport" -reporttypes:Html
  1. Open coveragereport folder
  • open index.html file

Code coverage report example

code coversage report

Local Run

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

Stryker .NET running

code coversage report

Go to the stryker report location:

cd <repository location>\MutationTestsExample\src\MutationTestsExample.Tests\StrykerOutput\<date run report>\reports\mutation-report.html

Stryker mutation score report

code coversage report