StrykerRunner 1.2.0
dotnet tool install --global StrykerRunner --version 1.2.0
dotnet new tool-manifest
dotnet tool install --local StrykerRunner --version 1.2.0
#tool dotnet:?package=StrykerRunner&version=1.2.0
nuke :add-package StrykerRunner --version 1.2.0
StrykerRunner
A .NET global tool to run Stryker mutation testing across multiple projects and generate unified reports.
What it does
StrykerRunner automates the process of running Stryker.NET mutation testing across multiple projects and combines the results into a single unified HTML report. It:
- Resolves test project(s) using the following priority order:
--solutionflag (explicit.sln/.slnxpath) → discovers all*.Tests/*.Testprojects from the solution- Auto-detects a
.slnfile in the current directory - Auto-detects a
.slnxfile in the current directory --test-projectflag (explicit.csprojpath)- Falls back to the first
.csprojfound in the current directory
- Discovers project references from each test project
- Filters out test projects and other excluded patterns (Init, CommunicatieModels, Reqnroll, etc.)
- Runs Stryker mutation testing on each discovered project
- Aggregates the JSON reports from all runs
- Generates a unified HTML report using mutation-testing-elements
Installation
Install as a global .NET tool:
dotnet tool install --global StrykerRunner
Or install from source:
dotnet pack
dotnet tool install --global --add-source ./bin/Debug StrykerRunner
Usage
Navigate to your test project directory and run:
stryker-runner
Options
--solution <path>- Path to a.slnor.slnxsolution file. If not provided, auto-detects a solution in the current directory. Takes precedence over--test-project.--test-project <path>- Path to the test project .csproj file. If not provided, searches for a .csproj in the current directory.--output <directory>- Base output directory for Stryker reports. Default:./StrykerOutput--report-name <name>- Name of the unified HTML report file. Default:UnifiedMutationReport.html--exclude-patterns <pattern>- Regex patterns to exclude projects (in addition to test projects). Can be specified multiple times. Default patterns:\.Init$- Excludes initialization/migration projects\.CommunicatieModels$- Excludes CommunicatieModels projects\.Reqnroll$- Excludes Reqnroll projects
Examples
Basic usage from a solution or project directory (auto-detects .sln / .slnx / .csproj):
stryker-runner
Manually specify a solution file:
stryker-runner --solution ./MySolution.sln
Manually specify a .slnx solution file:
stryker-runner --solution ./MySolution.slnx
Specify a test project directly:
stryker-runner --test-project ./MyProject.Tests/MyProject.Tests.csproj
Custom output directory:
stryker-runner --output ./MutationReports
Add custom exclusion patterns:
stryker-runner --exclude-patterns "\.Init$" "\.Models$" "\.Contracts$"
Output
The tool generates a timestamped folder structure:
StrykerOutput/
└── 2024-01-21_14-30-00/
├── ProjectA/
│ └── reports/
│ └── mutation-report.json
├── ProjectB/
│ └── reports/
│ └── mutation-report.json
└── UnifiedMutationReport.html
Open UnifiedMutationReport.html in your browser to view the combined mutation testing results for all projects.
Requirements
- .NET 8.0 SDK or later
- Stryker.NET must be installed globally or locally
Uninstall
dotnet tool uninstall --global StrykerRunner
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.