Quick Start¶
Run irradiate on a Python project with an existing pytest test suite.
Step 1: Run mutation testing¶
From the project root:
irradiate will:
- Parse all
.pyfiles undersrc/and generate mutants - Run one pytest session to map which tests cover which functions
- Fork a child process per mutant inside pre-warmed workers
- Print a summary
Example output:
Generating mutants...
done in 3ms (142 mutants across 8 files)
Running stats + validation...
done in 1.2s
Running mutation testing (142 mutants, 8 workers)...
Mutation testing complete (142 mutants in 4.2s, 34 mutants/sec)
Killed: 128
Survived: 9
No tests: 3
Timeout: 2
Score: 93.4%
Step 2: View results¶
Shows survived mutants — the ones your tests missed:
Step 3: Inspect a specific mutant¶
Shows the diff:
A survived mutant here means no test caught the + to - change.
Step 4: Incremental mode¶
On a feature branch, test only functions you changed:
Step 5: Reports¶
# JSON report (Stryker mutation-testing-report-schema v2)
irradiate run --report json
# Self-contained HTML report
irradiate run --report html
In GitHub Actions, irradiate auto-detects CI and adds inline annotations on survived mutants.
Step 6: CI gating¶
Fail the build if mutation score drops below a threshold:
Cache behavior¶
Results are cached by content hash. Unchanged functions with unchanged tests skip on re-runs:
Next steps¶
- Configuration — pyproject.toml settings
- CI Integration — GitHub Actions setup
- Understanding Results — what survived/killed/timeout mean