Add Mutation Testing
Setup comprehensive mutation testing with framework selection and CI integration
$ npx claude-code-templates@latest --command="testing/add-mutation-testing" --yesRequires Claude Code. The command adds this command to your project's .claudedirectory — nothing runs on ToolZip's servers.
What's inside this command
Component source
Add Mutation Testing
Setup mutation testing framework with quality metrics and CI integration: $ARGUMENTS
Current Testing Context
- Language: !
find . -name ".js" -o -name ".ts" | head -1 >/dev/null && echo "JavaScript/TypeScript" || find . -name ".py" | head -1 >/dev/null && echo "Python" || find . -name ".java" | head -1 >/dev/null && echo "Java" || echo "Multi-language" - Test coverage: !
find . -name "coverage" -o -name ".nyc_output" | head -1 || echo "No coverage data" - Test framework: !
grep -l "jest\\|mocha\\|pytest\\|junit" package.json pom.xml setup.py 2>/dev/null | head -1 || echo "Detect from tests" - CI system: !
find . -name ".github" -o -name ".gitlab-ci.yml" -o -name "Jenkinsfile" | head -1 || echo "No CI detected"
Task
Implement comprehensive mutation testing with framework optimization and quality gates:
Language Focus: Use $ARGUMENTS to specify JavaScript, Java, Python, Rust, Go, C#, or auto-detect from codebase Mutation Testing Framework:- Tool Selection & Setup - Choose framework (Stryker, PIT, mutmut, cargo-mutants), install dependencies, configure basic settings, validate installation
- Mutation Operator Configuration - Configure arithmetic operators, relational operators, logical operators, conditional boundaries, statement mutations
- Performance Optimization - Setup parallel execution, configure incremental testing, optimize file filtering, implement caching strategies
- Quality Metrics - Configure mutation score calculation, setup survival analysis, implement threshold enforcement, track effectiveness trends
- CI/CD Integration - Automate execution triggers, configure performance monitoring, setup result reporting, implement deployment gates
- Result Analysis - Setup visualization dashboards, configure surviving mutant analysis, implement remediation workflows, track regression patterns
Related Claude Code Commands
Generate Tests
Generate a complete test file for a specified source file or component. Use when the user explicitly asks to write, create, or generate tests for a specific file.
Test Coverage
Analyze and improve test coverage with comprehensive reporting and gap identification
Generate Test Cases
Generate comprehensive test cases with automatic analysis and coverage optimization
E2e Setup
Configure comprehensive end-to-end testing suite with framework selection and CI integration
Write Tests
Write comprehensive unit and integration tests with proper mocking and coverage
Test Automation Orchestrator
Orchestrate comprehensive test automation with intelligent execution and optimization
Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.