mutation-testing
Validate test suite effectiveness and uncover weak assertions by introducing code mutations and measuring kill rates. Essential for proving tests genuinely catch bugs rather than just satisfying coverage metrics.
Introduction
Mutation testing is a rigorous quality engineering practice that moves beyond traditional code coverage metrics to evaluate the actual efficacy of your test assertions. By programmatically injecting faults—such as modifying arithmetic operators, negating conditionals, or removing function calls—this skill allows you to observe whether your test suite correctly identifies these defects. A mutant is considered 'killed' if your tests fail, confirming that your test logic is robust. If a mutant survives, it highlights a blind spot where your code is running but not being effectively verified by your assertions.
This skill is designed for senior engineers, quality assurance architects, and automated testing fleets seeking to move from superficial 'green' builds to high-integrity, bug-catching test suites. It is particularly valuable before critical releases or during the maintenance of complex, high-risk business logic where standard coverage metrics provide a false sense of security. It integrates seamlessly with frameworks like Stryker for JavaScript/TypeScript, providing clear insights into mutation scores and identifying specific code paths that require more stringent test cases.
-
Automated injection of mutation operators including arithmetic, relational, logical, and statement-based faults.
-
Calculation of mutation scores to quantify test suite quality, with industry-standard thresholds for identifying 'Excellent' vs 'Needs Attention' suites.
-
Fleet coordination capabilities, enabling the orchestration of specialized agents such as qe-test-generator to automatically draft tests that target surviving mutants.
-
Seamless integration with coverage analysis tools to correlate untested paths with low-assertion quality.
-
Historical tracking of mutation performance via run-history logging, allowing teams to monitor improvements in test rigor over time.
-
Prioritize mutation testing for mission-critical code paths, such as authentication, payment processing, and data validation, rather than the entire codebase.
-
Always interpret high code coverage in conjunction with mutation scores; 100% coverage with zero effective assertions is a primary target for this skill.
-
Utilize the provided configuration templates for Stryker to ensure appropriate test runners (e.g., Jest, Vitest) are configured for specific project needs.
-
When a mutant survives, perform root cause analysis by examining the difference between the mutant and the original code to determine which boundary conditions or edge cases are missing from your test suite.
-
Leverage the agent-driven workflow to transition from identification (surviving mutants) to resolution (test generation) without manual intervention.
Repository Stats
- Stars
- 329
- Forks
- 65
- Open Issues
- 4
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 29, 2026, 07:53 AM