Test Coverage
Analyze and improve test coverage with comprehensive reporting and gap identification
$ npx claude-code-templates@latest --command="testing/test-coverage" --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
Test Coverage
Analyze and improve test coverage with detailed reporting and gap analysis: $ARGUMENTS
Current Coverage Context
- Test framework: !
find . -name "jest.config." -o -name ".nycrc" -o -name "coverage.xml" | head -1 || echo "Detect framework" - Coverage tools: !
npm ls nyc jest @jest/core 2>/dev/null | grep -E "nyc|jest" | head -2 || echo "No JS coverage tools" - Existing coverage: !
find . -name "coverage" -type d | head -1 && echo "Coverage data exists" || echo "No coverage data" - Test files: !
find . -name ".test." -o -name ".spec." | wc -ltest files
Task
Execute comprehensive coverage analysis with improvement recommendations and reporting:
Coverage Type: Use $ARGUMENTS to focus on line coverage, branch coverage, function coverage, statement coverage, or comprehensive reporting Coverage Analysis Framework:- Coverage Tool Setup - Configure appropriate tools (Jest, NYC, Istanbul, Coverage.py, JaCoCo), setup collection settings, optimize performance, enable reporting
- Coverage Measurement - Generate line coverage, branch coverage, function coverage, statement coverage reports, identify uncovered code paths
- Gap Analysis - Identify critical uncovered paths, analyze coverage quality, assess business logic coverage, evaluate edge case handling
- Threshold Management - Configure coverage thresholds, implement quality gates, setup trend monitoring, enforce minimum standards
- Reporting & Visualization - Generate detailed reports, create coverage dashboards, implement trend analysis, setup automated notifications
- Improvement Planning - Prioritize coverage gaps, recommend test additions, identify refactoring opportunities, plan coverage enhancement
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.
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
Setup Comprehensive Testing
Setup complete testing infrastructure with framework configuration and CI integration
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.