functional-testcases — functional test-case catalog
Turn the approved design into a functional test-case catalog: black-box cases derived from
observable behavior (the acceptance criteria + the contract's operations), not from the
implementation. Each case is a plain-language spec a human can execute by hand and that the QA
automation step later automates. Write cases only; never edit app code, never write automation
code or framework specs (that is the automation step's job). Every case must be justified by an
acceptance criterion or a contract operation — never derive cases from internals.
Inputs
Your instructions name what to read — the HLD, the cross-repo contract, and the acceptance
criteria — and the artifact path to write the catalog. Standalone? read them and write to a
path you choose (and tell the user where).
Steps
- Read the acceptance criteria, HLD, and contract. List every acceptance criterion and
every contract operation (method/path or event) — these are the things a case must cover.
- Derive journeys — group behaviors into user/client journeys. Rank by risk tier
(critical / high / normal) so the automation step knows what to automate first.
- Write one case per observable behavior (template below): the primary happy path for each
journey, then the negative and edge behaviors the contract and acceptance criteria define.
- Trace every case back to the acceptance criterion id and/or contract operation it
verifies — no untraceable case, no uncovered criterion.
- State scope — what is explicitly out of scope (non-functional load/perf, exploratory),
and any assumption a case depends on.
Test-case template (every case)
- ID — stable, e.g.
TC-<slug>-001.
- Title — the behavior in one line.
- Type — positive | negative | edge.
- Priority / risk tier — critical | high | normal.
- Preconditions — required state / seeded data / auth & permission.
- Steps — numbered, black-box (what a user/client does), no internals.
- Expected result — observable outcome + the contract outcome it must match (status,
error envelope, side effect).
- Test data — the inputs the case seeds (self-contained; no shared mutable state).
- Traces — acceptance-criterion id(s) and/or contract operation(s) covered.
Coverage standards (the catalog must satisfy)
- Every acceptance criterion has ≥1 case; every contract operation has a happy case
and its defined error cases.
- Negatives & edges from the contract — empty/missing/null inputs, oversized payloads,
duplicate submissions, pagination boundaries (first/last/empty page), unstable ordering.
- Authz — permission-denied, expired/insufficient-scope token, cross-tenant attempt.
- Limits & resilience — rate-limit exhaustion (429 + retry-after), downstream error
surfaced to the client, session expiry mid-flow, concurrent/double-submit where allowed.
- Frontend-observable states — loading, empty, error, and "many items"/pagination where the
feature has UI.
- Deterministic & isolated — each case seeds and tears down its own data; order-independent;
no case depends on another's leftovers.
- Safe — seeded test data only; never real secrets or production data.
Output — write this artifact
Write the catalog to the path your instructions specify, containing:
- A short header: feature, scope, out-of-scope, data strategy, risk-tier legend.
- A coverage matrix mapping each acceptance criterion / contract operation → the case IDs
that cover it (prove nothing is uncovered).
- The cases, grouped by journey, each following the template above.
Definition of done
Every acceptance criterion and contract operation is covered by ≥1 traceable case; negatives,
edges, and authz paths are present (not "TBD"); each case is black-box, self-contained, and
deterministic; scope and out-of-scope stated. Do not automate — the automation step turns this
catalog into the executable E2E suite.
Output contract
Return test_cases_path, case_count, and coverage_summary (2–3 sentences: journeys
covered, notable negatives/edges, anything deferred).
1---2name: functional-testcases3description: Author a FUNCTIONAL test-case catalog (human-readable, black-box) for a feature by deriving cases from the acceptance criteria, the HLD, and the cross-repo contract — one case per behavior a user or client can observe, positive + negative + edge, each traceable to the criterion/operation it verifies. Black-box QA source of truth, NOT automation code. Reads the design artifacts; writes the catalog; never edits app code. Front door for /functional-testcases.4---56# functional-testcases — functional test-case catalog78Turn the approved design into a **functional test-case catalog**: black-box cases derived from9**observable behavior** (the acceptance criteria + the contract's operations), not from the10implementation. Each case is a plain-language spec a human can execute by hand and that the QA11automation step later automates. Write cases only; never edit app code, never write automation12code or framework specs (that is the automation step's job). Every case must be justified by an13acceptance criterion or a contract operation — never derive cases from internals.1415## Inputs16Your instructions name what to read — the HLD, the cross-repo contract, and the acceptance17criteria — and the artifact path to write the catalog. Standalone? read them and write to a18path you choose (and tell the user where).1920## Steps211. **Read** the acceptance criteria, HLD, and contract. List every acceptance criterion and22 every contract operation (method/path or event) — these are the things a case must cover.232. **Derive journeys** — group behaviors into user/client journeys. Rank by risk tier24 (critical / high / normal) so the automation step knows what to automate first.253. **Write one case per observable behavior** (template below): the primary happy path for each26 journey, then the negative and edge behaviors the contract and acceptance criteria define.274. **Trace** every case back to the acceptance criterion id and/or contract operation it28 verifies — no untraceable case, no uncovered criterion.295. **State scope** — what is explicitly out of scope (non-functional load/perf, exploratory),30 and any assumption a case depends on.3132## Test-case template (every case)33- **ID** — stable, e.g. `TC-<slug>-001`.34- **Title** — the behavior in one line.35- **Type** — positive | negative | edge.36- **Priority / risk tier** — critical | high | normal.37- **Preconditions** — required state / seeded data / auth & permission.38- **Steps** — numbered, black-box (what a user/client does), no internals.39- **Expected result** — observable outcome + the contract outcome it must match (status,40 error envelope, side effect).41- **Test data** — the inputs the case seeds (self-contained; no shared mutable state).42- **Traces** — acceptance-criterion id(s) and/or contract operation(s) covered.4344## Coverage standards (the catalog must satisfy)45- **Every acceptance criterion** has ≥1 case; **every contract operation** has a happy case46 and its defined error cases.47- **Negatives & edges from the contract** — empty/missing/null inputs, oversized payloads,48 duplicate submissions, pagination boundaries (first/last/empty page), unstable ordering.49- **Authz** — permission-denied, expired/insufficient-scope token, cross-tenant attempt.50- **Limits & resilience** — rate-limit exhaustion (429 + retry-after), downstream error51 surfaced to the client, session expiry mid-flow, concurrent/double-submit where allowed.52- **Frontend-observable states** — loading, empty, error, and "many items"/pagination where the53 feature has UI.54- **Deterministic & isolated** — each case seeds and tears down its own data; order-independent;55 no case depends on another's leftovers.56- **Safe** — seeded test data only; never real secrets or production data.5758## Output — write this artifact59Write the catalog to the path your instructions specify, containing:60- A short **header**: feature, scope, out-of-scope, data strategy, risk-tier legend.61- A **coverage matrix** mapping each acceptance criterion / contract operation → the case IDs62 that cover it (prove nothing is uncovered).63- The **cases**, grouped by journey, each following the template above.6465## Definition of done66Every acceptance criterion and contract operation is covered by ≥1 traceable case; negatives,67edges, and authz paths are present (not "TBD"); each case is black-box, self-contained, and68deterministic; scope and out-of-scope stated. Do not automate — the automation step turns this69catalog into the executable E2E suite.7071## Output contract72Return `test_cases_path`, `case_count`, and `coverage_summary` (2–3 sentences: journeys73covered, notable negatives/edges, anything deferred).