mutation-testinglisted
Install: claude install-skill SebastienDegodez/skraft-plugin
# Mutation Testing
Verify that tests **actually catch bugs** — not just execute code.
## Core Rule
A test that kills no mutant is noise. DELETE IT.
## When to Load
- Entering phase 4 (COMMIT & VERIFY) of the TDD cycle.
- Investigating a surviving mutant.
- Confirming a kill after writing a boundary test.
**Never run on a red baseline** — fix tests first.
## S7 — Deterministic Execution (Non-Negotiable)
Mutation testing MUST be executed via terminal tool calls. Do NOT assert
results from prose. The flow is:
```
1. runInTerminal → dotnet stryker (with correct args)
2. Parse JSON output → extract survivors
3. Decide: kill (write test) or document (equivalent mutant)
4. Re-run scoped stryker → confirm kill
```
## Step 1: Run Stryker (via terminal)
### Detect project paths first
Before running, identify:
- `--project` : the production `.csproj` being mutated (Domain or Application)
- `-tp` : the test `.csproj` that exercises it
### During development (fast — changed code only)
```bash
dotnet stryker \
--project <Production.csproj> \
-tp <Tests.csproj> \
--since:main \
--break-at 100 \
--reporter json --reporter cleartext
```
### Before merge (full business logic)
```bash
dotnet stryker \
--project <Production.csproj> \
-tp <Tests.csproj> \
--mutate "**/*.cs" \
--mutate "!**/*Marker.cs" \
--mutate "!**/DependencyInjection.cs" \
--mutate "!**/obj/**" \
--break-at 100 \
--threshold-high 90 --threshold-low 80 \
--reporter json --reporter cle