QA TEMPLATE / SAMPLE
Test Case
Test case | Steps, data, expectations and separate Runs
What this document answers
Cases define data, operations and checkpoints; each execution gets a separate Run. Version v1.2 here identifies a teaching document, without rewriting this site's existing Runs or real product cases.
Blank template
[Required] applies to every case. [Conditional] is required when applicable; explain when it is not. Copy the text into your case documents and replace the brackets. This static page has no editing or saving function.
[Required] Case ID / version: [ ] Title / purpose: [ ] [Required] Scenario / requirement / risk IDs: [ ] [Required] Oracle source and version / confirmation status: [ ] [Required] Case Priority / rationale: [ ] (may override Scenario default) [Required] Automation suitability: [automatable / partly automatable / manual]; rationale and manual checkpoints: [ ] [Required] Automation implementation / script reference: [not implemented / blocked / implemented; reference] [Conditional] Preconditions: [account, role, environment, prior state and dependencies] [Conditional] Test Data: [concrete values / dataset version, row ID, equivalence class / boundary] [Required] Steps / Expected: S1 operation → CP1; S2 operation → CP2; enumerate each [Conditional] Wait / stop: [observable condition, time limit, retry and budget caps] [Conditional] Data contract reference: [DC ID / version / clause link]; case inputs and derived expectations: [ ] [Conditional] AI design: [data, model, prompt, evaluation version, K, allowed variation, per-attempt and aggregate oracles] [Conditional] Postconditions / Cleanup: [retained state and authorized restoration] [Required] Evidence requirements: [raw input / output, operation / event ID, time, location] [Required] Review status and open questions: [ ] Actual Result and execution status belong in the Run Log; this page keeps links only.
Complete case: reject a stale sequence
TC-MDQ-017 · v1.2|Rejects a stale-sequence market-data update
Trace: DEMO-REQ-STALE ↔ RISK-OB-SEQ ↔ DEMO-SC-BOOK. Priority P0, based on the impact of stale market data overwriting state.
Suitable for automation: sequences and complete snapshots can be compared deterministically. Implementation status here: no executable script supplied; synthetic site logs do not prove real execution.
| Item | Content |
|---|---|
| Preconditions | Isolated DEMO-BOOK / build-demo-1; load SNAP-104 with no background feed. Completion signals and state capture are available. |
| Test Data | DEMO-BOOK-DATA-v1 / STALE-103: current=104, bid 100×2, ask 101×3; E-103 attempts to change bid quantity at 100 to 9. |
| Oracle | DEMO-DC-MDQ v1.0 C1~C4. Expect E-103 to be rejected: sequence=104, bid 100×2, ask 101×3, with the entire state unchanged. |
| Wait / stop | Read state after event completion; do not invent a product SLA. Missing completion signal or snapshot means Blocked. Confirmed acceptance of the old event or state change means Fail; preserve evidence and stop the case. |
| AI | This case uses deterministic comparison; model / prompt / K are not applicable. If AI organizes evidence, retain inputs and versions and manually compare against raw results. AI must not rewrite Pass / Fail criteria. |
| Step | Operation | Expected / checkpoint |
|---|---|---|
| S1 | Load an isolated SNAP-104 and retain the baseline snapshot and time. | CP1: sequence=104, bid 100×2, ask 101×3; stop if preconditions do not match. |
| S2 | Inject E-103 exactly once; retain event ID and completion signal. | CP2: the event is rejected and no update is applied. |
| S3 | Read the entire Order Book and compare every field with the baseline. | CP3: sequence remains 104, bids / asks match exactly, tolerance 0. |
Cleanup: retain before / after snapshots, then reset the isolated fixture. Deletion of real data requires separate authority. Design status: synthetic teaching assumptions; real specifications and review are pending.
Other independent cases
TC-MDQ-016 · v1.2 | Accept the next sequential update
Purpose: verify the next sequence is applied. Source DEMO-REQ-NEXT; Scenario DEMO-SC-BOOK; risk RISK-OB-SEQ; P0, automatable, no executable script supplied here. Data DEMO-BOOK-DATA-v1 / NEXT-105, following contract C1–C4.
S1 load and retain an isolated SNAP-104, CP1 confirms the baseline. S2 inject E-105 once and wait for completion, CP2 accepts the event. S3 read state, CP3 expects sequence=105, bid 100×4, ask 101×3. Evidence, stop conditions and cleanup follow the main case.
TC-MDQ-018 · v1.2 | Restore the latest snapshot after reconnect
Purpose: verify recovery fully replaces old state. Source DEMO-REQ-RECONNECT; Scenario DEMO-SC-BOOK; risk RISK-OB-SEQ; P1, automatable, no executable script supplied here. Data DEMO-BOOK-DATA-v1 / RECONNECT-106, following contract C1–C4.
S1 load and retain an isolated SNAP-104, CP1 confirms the baseline. S2 simulate disconnect / reconnect in the fixture and supply SNAP-106, CP2 receives the complete snapshot-applied signal. S3 read state, CP3 expects sequence=106, bid 100×5, ask 101×6, with no old levels remaining. Evidence, stop conditions and cleanup follow the main case; no real exchange recovery algorithm is implied.
Execution record entry
Actual Result, Status, time and evidence belong only in the Run Log; this page keeps links. For the overall derivation, see the Quality Report.