92
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill jmagly/aiwg --skill mutation-test- SKILL.md7.1 KB
Overview
This skill runs mutation testing to measure how effective a test suite really is, not just how much code it covers. It introduces small code changes (mutants), runs tests, and reports which mutants survive so you can find weak assertions and untested behaviors. Use it to raise test quality, prioritize test improvements, and gate releases by mutation score.
How this skill works
The skill detects project type, installs and configures an appropriate mutator (Stryker for TypeScript/JavaScript, mutmut for Python, PITest for Java), runs mutation analysis, and parses the resulting report. It calculates mutation score, lists survived mutants with file/line/mutator details, and produces prioritized remediation suggestions and CI checks.
When to use it
- Validating test effectiveness beyond line coverage
- Investigating why bugs escape the test suite
- Assessing test suite health before releases
- Finding weak or missing assertions and boundary cases
- Targeting critical modules for deeper testing
Best practices
- Run mutation testing against critical modules first to reduce runtime and focus effort
- Use per-test coverage or incremental mode to speed feedback
- Set a realistic threshold (e.g., 80%) and fail CI when score drops below it
- Prioritize surviving mutants by impact (security, payment, auth) and fix tests with clear examples
- Combine mutation reports with coverage data to find high-coverage, low-quality tests
Example use cases
- Add mutation testing to CI to prevent regressions in test quality
- Audit a codebase where high coverage still lets bugs through—identify missing assertions
- Run incremental mutation testing during feature development for fast feedback
- Produce a prioritized remediation plan showing survived mutants and exact test cases to add
- Validate test-suite improvements by tracking mutation score over time
FAQ
Runtime depends on project size and configuration; focus on critical modules and use incremental/per-test coverage to shorten feedback loops.
What does a low mutation score mean?
A low score indicates tests are not catching realistic code changes—often missing boundary cases, weak assertions, or untested error paths.
Can I run mutation testing in CI?
Yes. Export JSON reports and fail a CI step when the mutation score falls below your threshold (example: 80%). Use incremental runs for regular CI to limit cost.