Introduction to Stryker.NET
Stryker.NET is an advanced tool designed for mutation testing in .NET Core and .NET Framework projects. Mutation testing offers a unique way to test the effectiveness of your unit tests by intentionally introducing bugs or "mutants" into the source code to check whether the tests can catch the errors. This approach helps ensure that your tests are robust and can adequately handle unexpected changes in code.
If you're new to mutation testing, or want to explore what Stryker.NET can do, you can find more detailed information at stryker-mutator.io. The Stryker family also offers mutation testing tools for other programming languages, such as JavaScript, TypeScript, and Scala.
Compatibility
Stryker.NET is compatible with a range of .NET versions. The minimum requirement for projects includes:
- .NET Core version 1.1
- .NET Framework version 4.5
- .NET Standard version 1.3
It has been tested thoroughly against .NET Core 3.1 and .NET Framework 4.8, ensuring reliable performance under these configurations.
Getting Started with Stryker.NET
Getting started with Stryker.NET is straightforward. Here's a quick guide on how to begin:
-
Install the tool globally on your machine using the .NET CLI:
dotnet tool install -g dotnet-stryker
-
Navigate to the folder containing your unit test project:
cd /my/unit/test/project/folder
-
Run Stryker to start the mutation testing process:
dotnet stryker
For detailed instructions, you can refer to the getting started guide.
Documentation and Resources
To explore the full capabilities of Stryker.NET, including configuration options, consult the documentation.
Migrating to the Latest Version
If you're upgrading from an older version of Stryker.NET, the migration guide provides all the necessary information to make the transition smooth.
Supported Mutations
Stryker.NET supports a variety of mutations, which are the intentional changes made in the code to test the tests. For a comprehensive list, see the mutations documentation.
Reporting Features
The tool comes with several reporters to help visualize the results of your mutation tests. For more information, check the reporters documentation.
Contributing to Stryker.NET
For those interested in contributing to Stryker.NET's development, the project welcomes new contributors. More details can be found in the contribution guide. If there are specific issues with the HTML report, they should be addressed in the mutation-testing-elements repository.
Stryker.NET empowers developers to write more effective tests, ensuring a higher standard of code quality through robust mutation testing practices.