用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/wojons/skills --skill test-coverage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | test-coverage |
| description | Measure and report test coverage across all test types |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","category":"testing"} |
Measure, analyze, and report test coverage across all test types, including code coverage, requirement coverage, risk coverage, and quality attribute coverage.
Use this skill when:
Multi-dimensional coverage analysis:
Coverage measurement:
Gap analysis and recommendations:
Reporting and visualization:
# Measure overall test coverage
npm run test:coverage:measure # Comprehensive coverage measurement
npm run test:coverage:report # Generate coverage report
# Specific coverage types
npm run test:coverage:code # Code coverage analysis
npm run test:coverage:requirements # Requirement coverage analysis
npm run test:coverage:risks # Risk coverage analysis
npm run test:coverage:scenarios # Scenario coverage analysis
npm run test:coverage:data # Data coverage analysis
# Integration with test types
npm run test:coverage -- --include unit,integration,e2e
npm run test:coverage -- --exclude performance,security
npm run test:coverage -- --type functional
npm run test:coverage -- --type nonfunctional
# Coverage visualization
npm run test:coverage:visualize # Generate coverage visualizations
npm run test:coverage:dashboard # Coverage dashboard
npm run test:coverage:trends # Coverage trend analysis
# Coverage targets
npm run test:coverage:targets # Check against coverage targets
npm run test:coverage:gaps # Identify coverage gaps
Test Coverage Analysis Report
──────────────────────────────
Project: Customer Portal v1.3
Analysis Period: Last 30 days
Test Types Included: 8 of 12
Overall Coverage Summary:
- Code Coverage: 78% (target: 80%)
- Requirement Coverage: 92% (target: 95%)
- Risk Coverage: 85% (target: 90%)
- Scenario Coverage: 88% (target: 85% ✓)
- Quality Attribute Coverage: 72% (target: 75%)
Code Coverage Detail:
- Statements: 82% (45,210/55,134)
- Branches: 71% (12,345/17,390)
- Functions: 85% (3,456/4,067)
- Lines: 80% (38,765/48,456)
By Test Type Contribution:
Unit Tests:
- Code Coverage: 65% primary contributor
- Fastest feedback, highest volume
Integration Tests:
- Code Coverage: +12% incremental
- API and database coverage
E2E Tests:
- Code Coverage: +1% incremental
- User journey coverage
Security Tests:
- Requirement Coverage: +15% security requirements
- No code coverage contribution
Requirement Coverage:
Functional Requirements: 145/150 (97%)
- Missing: FR-23 (reporting export), FR-45 (bulk update)
Non-Functional Requirements: 28/35 (80%)
- Missing: NFR-12 (concurrent users), NFR-18 (data retention)
Risk Coverage:
High Risks: 8/10 covered (80%)
- Uncovered: R-05 (payment failure), R-09 (data corruption)
Medium Risks: 22/25 covered (88%)
Low Risks: 45/50 covered (90%)
Scenario Coverage:
User Journeys: 15/18 covered (83%)
- Uncovered: Guest checkout, Account deletion
Business Processes: 8/10 covered (80%)
Admin Flows: 6/8 covered (75%)
Coverage by Component:
- Authentication: 95% (excellent)
- User Management: 88% (good)
- Billing: 65% (needs improvement)
- Reporting: 45% (poor)
- API Gateway: 92% (good)
Coverage Gaps Analysis:
Critical Gaps:
1. Billing module has low test automation
2. Reporting features largely untested
3. Payment failure scenarios not covered
Moderate Gaps:
1. Admin flows need more test coverage
2. Edge cases in user management
Minor Gaps:
1. Some utility functions untested
2. Legacy code with no recent test updates
Test Type Effectiveness:
- Most Effective: Unit tests (high coverage, fast)
- Best for Risk Coverage: Integration tests
- Best for User Confidence: E2E tests
- Most Impactful for Quality: Security & performance tests
Recommendations:
1. Increase unit test coverage in billing module to 80%
2. Add integration tests for reporting functionality
3. Implement security tests for payment processing
4. Create E2E tests for guest checkout scenario
5. Review and update test targets for next quarter
Trend Analysis:
- Code coverage increased from 72% to 78% this quarter
- Requirement coverage stable at 92%
- Risk coverage improved from 80% to 85%
- Positive trend overall, but billing module declining