Generate Coverage Plan
1. Confirm Inputs
- Require approved requirements, approved contract analysis, or both.
- List the in-scope features, endpoints, roles, and environments.
- List the excluded scope explicitly.
- Capture any explicit priority order for OpenAPI tags, business domains, or endpoint groups before ordering the matrix.
2. Build The Scenario Matrix
- Create happy-path scenarios.
- Create validation scenarios for required fields, formats, ranges, enums, and body shape.
- Create authentication and authorization scenarios.
- Create negative and error-response scenarios.
- Create workflow and state-transition scenarios.
- Create integration or virtualization scenarios when dependencies matter.
- Create a dedicated contract-mismatch section whenever a live environment already exists or historical drift is known.
- When the contract uses tags, group the scenario matrix by tag unless the user asked for a different grouping.
- Order tag groups by explicit user priority first, then by business criticality, then by contract breadth.
3. Add Traceability
- Map each scenario to its requirement ID, contract path, or WSDL operation.
- Keep one row per scenario.
- Mark the intended execution type, for example smoke, regression, contract, or integration.
- Mark mismatch rows explicitly as
Contract mismatchinstead of hiding them inside generic negative coverage. - Keep the tag or domain group visible in each row when tag-based prioritization is active.
4. Output
- Output a human-readable matrix.
- Start from coverage-matrix-template.md when the user has not specified a different format.
- Keep the columns stable so later sync and reporting work can reuse the matrix.
- Hand the matrix to dispatcher intent
review_api_test_coverage_planfor explicit approval. - If mismatch scenarios exist, send the approved mismatch rows to
../../documentation/contract-mismatches/SKILL.md.
If dispatcher routing is unavailable, use ../review/SKILL.md for approval.
5. Examples
- Input:
Generate coverage for Orders from AUTH-US02 and openapi/orders.yaml.Output: A matrix that merges story coverage with contract-derived validations and errors. - Input:
Generate coverage for the live Petstore API and capture known drift from OpenAPI.Output: A matrix with separate happy-path, negative, and contract-mismatch rows. - Input:
Generate coverage for the billing API, but prioritize the Payments and Refunds tags first.Output: A matrix grouped by tag with Payments and Refunds ordered ahead of the remaining tag groups.
6. Troubleshooting
- Problem: The contract contains endpoints outside the user scope. Fix: Exclude them explicitly instead of silently dropping them.
- Problem: The live API already behaves differently from the contract.
Fix: Add dedicated
Contract mismatchrows and keep them traceable to both the contract path and the observed runtime evidence. - Problem: The contract has many tags and the matrix becomes noisy. Fix: Keep only in-scope tags, order them explicitly, and group rows under the surviving tag headings.