test-coverage-map
Maps what is tested and what is not by requirement, journey, code area and test level, not only line coverage, and shows the pyramid shape. Use when the user says 'coverage gaps' or asks 'what is not tested' or 'which requirements have no tests'. Not for the quality of each test (use testcase-reviewer).
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- test-coverage-map
- license
- Apache-2.0
- description
- Maps what is tested and what is not by requirement, journey, code area and test level, not only line coverage, and shows the pyramid shape. Use when the user says 'coverage gaps' or asks 'what is not tested' or 'which requirements have no tests'. Not for the quality of each test (use testcase-reviewer).
- argument-hint
- [repository, module, feature or requirement set]
03 SKILL.md 正文
test-coverage-map
Objective
Line coverage shows which lines ran. It does not show which rules are checked, or which requirements have no test. This skill maps the tests to requirements and to code areas, rates each target as covered, weak or untested, and ranks the gaps by risk.
Context
- Read
.agents/qa-project-context.mdif it exists. Use its test levels, requirement sources and coverage reports. - If it does not exist, find the tests, the requirement sources and any coverage report in the repository. Suggest
qa-project-contextonce. Do not stop the work for it.
Discovery questions
- What is the scope: the whole repository, a module, a feature, a set of requirements?
- Where are the requirements (specs, stories, contracts, documentation)?
- Does a coverage report exist, or may the coverage command run?
Workflow
- Inventory the tests. For each test file, note the level: unit, component or API, integration, contract, or end-to-end UI. Note the area that it tests, and the requirement IDs or behaviors that it names.
- Inventory the targets: requirements and acceptance criteria, code areas (modules, services, public functions, endpoints), and user journeys.
- Map each test to the targets. Use explicit links first (IDs in names, tags, comments), then the code that the test calls. Mark each link as explicit or inferred.
- Rate each target: COVERED (at least one strong test that checks values or effects), WEAK (only weak tests, or only end-to-end tests for a business rule), UNTESTED.
- Line coverage. Read an existing report, or run the coverage command with the user's agreement. Mark risky code without coverage: error paths, validation, calculations, permission checks.
- Test pyramid. Count the tests at each level, and name the shape problems.
- Rank the gaps by risk (see
risk-based-testing).
Output
## Test coverage map: <scope>
| Level | Tests | Share |
|---|---|---|
| Requirement / behavior | Status | Tests (explicit / inferred) | Note |
|---|---|---|---|
| Code area | Status | Line coverage | Risky untested paths |
|---|---|---|---|
Top gaps to close: <target> - why - the test to add, and its level
Anti-patterns
- Line coverage as the answer. A covered line with no assertion is not tested.
- Inferred links shown as facts. Mark them.
- Equal weight for all gaps. An untested permission check matters more than an untested log line.
Done when
- Each requirement and code area in scope has a status, with explicit or inferred links.
- The test pyramid shape is described.
- The top gaps are ranked by risk, each with the test to add.
Related skills
risk-based-testing: the risk of each gap.testcase-reviewer: the quality of the tests that exist.mutation-probe: whether covered code is really checked.test-strategy: the target shape of the suite.
04 同仓库更多 Skills
unit-testing
Writes, fixes or improves unit tests for rules, calculations, validation and state logic: arrange-act-assert, exact oracles, boundary sets, doubles only at boundaries, controlled clock and randomness. Use when the user says 'write unit tests', 'TDD this' or 'mock this dependency'. Not for HTTP endpoints (use api-testing).
ui-automation
Writes, fixes or structures browser end-to-end tests for critical journeys: role, label or test ID locators, auto-waiting assertions, API data setup, page objects, auth reuse and traces. Use when the user says 'UI test', 'end-to-end test' or 'our UI tests are brittle'. Not for business rules (use unit-testing).
testcase-reviewer
Reviews automated tests or manual test cases like a senior test architect: scores fidelity, oracles, assertion depth, edge cases and determinism, and finds tests that pass on wrong code. Use when the user says 'review my tests', 'test smells' or 'review AI-written tests'. Not for fault injection (use mutation-probe).
testability-review
Scores how testable a feature, module or design is before tests exist (seams for clock, randomness and network, hidden state, observability) and gives the smallest production change per blocker. Use when the user asks 'is this testable' or 'why is this hard to test'. Not for writing the tests (use unit-testing).
test-strategy
Writes a test strategy for a product, system or team: quality goals, test levels and their share, environments, data, automation scope, non-functional testing, metrics and a roadmap. Use when the user says 'test strategy' or 'QA strategy'. Not for one sprint or release plan (use test-planning).
test-runner
Finds how a project runs its tests, runs the right subset, and triages each failure as product bug, test defect, environment problem or flaky test, with evidence. Use when the user says 'run the tests' or asks 'which tests fail and why'. Not for pipeline design (use ci-cd-integration).