Domain specifications / D08-ANL / 15. Testing and Verification Requirements
15. Testing and Verification Requirements¶
15.1 Verification Strategy¶
- Unit testing. Transformation logic, validation rules, metric calculations, version selection by effective date, de-identification treatments, gateway policy logic and state transitions.
- Component testing. Each pipeline stage with fixed inputs and expected outputs; registry lifecycle; quality engine; reconciliation service; AI gateway with stubbed models.
- Integration testing. Event and extract contracts with each source domain, including duplicates, delays, out-of-order delivery, schema evolution, consumer outage and replay; Domain 10 policy, terminology and audit integration; Domain 9 measure API.
- End-to-end workflow testing. Source transaction to dashboard value with reconciliation; metric change through approval to reproduced historical report; extract request to release and expiry; AI request to human disposition and owning-domain commit.
- Data and reconciliation testing. Known-answer data sets for every certified metric; reconciliation of dashboards to source transactions (ANA-001); lineage trace sampling (ANA-004).
- Performance testing. Dashboard and query response under peak analytical load; the combined isolation test of peak clinical load plus maximum analytical workload (ANA-003; PRS section 17.1 "analytics isolation").
- Security testing. Threat model; penetration test; access-control tests for row, column and purpose restrictions; refused OLTP connection; export audit; AI prompt-injection and data-leakage tests; privacy tests for de-identification (SEC-011, SEC-012).
- Usability testing. Task-based tests with managers, analysts, stewards, approvers and AI reviewers, including recognition of stale and AI-drafted content.
- User acceptance testing. Metric owners accept each definition and dashboard against source reports; finance accepts reproduced reports; clinical governance accepts clinical measures and AI use cases; privacy office accepts extract controls.
- Operational readiness testing. Monitoring and alerts, runbooks, backup and restore, rebuild from raw, stewardship process and support escalation.
- Test data. Approved synthetic or de-identified data unless a controlled production validation is explicitly authorized (PRS section 17.3).
15.2 Test Scenario Catalogue¶
| Test ID | Requirement ID | Scenario | Test Type | Expected Result |
|---|---|---|---|---|
| TEST-ANL-001 | FR-ANL-OPS-001 | Run completeness report against Appendix B | Functional | All nine dashboards and listed indicators published and bound to Active metrics |
| TEST-ANL-002 | FR-ANL-OPS-001 | Facility-scoped user opens dashboards; draft with non-Active metric submitted | Security / Functional | Only authorized scope returned; publication rejected |
| TEST-ANL-003 | FR-ANL-OPS-002 | Compute clinical operations indicators from a known event set | Reconciliation | Values equal independent computation from source transactions |
| TEST-ANL-004 | FR-ANL-OPS-002 | Late discharge event; feed stopped | Functional | Period restated and marked; stale marker shown, not zero |
| TEST-ANL-005 | FR-ANL-OPS-003 | Diagnostic turnaround from known orders and results; unacknowledged critical result in source | Reconciliation | Values reconcile; item remains counted until closed in source |
| TEST-ANL-006 | FR-ANL-OPS-003 | CDS log events with review outcomes; rule above review threshold | Functional | Frequency and appropriateness separate; rule listed for Domain 3; rule unchanged |
| TEST-ANL-007 | FR-ANL-OPS-004 | Render and export dashboards; age a product beyond threshold | Functional | Cutoff, watermark, quality and reconciliation shown; stale marker displayed |
| TEST-ANL-008 | FR-ANL-OPS-004 | Refresh with variance above suspension threshold | Functional | Last good version kept with warning; stewardship item created |
| TEST-ANL-009 | FR-ANL-CQI-001 | Indicator on known-answer data set | Functional | Numerator, denominator, exclusions and value correct |
| TEST-ANL-010 | FR-ANL-CQI-001 | Definition change effective mid-year | Functional | Earlier periods keep earlier version; version shown |
| TEST-ANL-011 | FR-ANL-CQI-002 | Pathway events for two versions | Functional | Measures per version with components and lineage |
| TEST-ANL-012 | FR-ANL-CQI-002 | Documented deviations; inspect data access | Functional / Inspection | Justified variance separate; no OLTP query |
| TEST-ANL-013 | FR-ANL-FRR-001 | Reproduce an issued report after definition change | Functional | Identical values; restated view marked |
| TEST-ANL-014 | FR-ANL-FRR-001 | Reversed and re-posted charge | Reconciliation | Net revenue equals ledger |
| TEST-ANL-015 | FR-ANL-FRR-002 | Billable events with charges, exceptions and one missing charge | Functional | Accounted-for rate correct; missing charge listed and referred |
| TEST-ANL-016 | FR-ANL-DWH-001 | Peak clinical load plus maximum analytical workload | Performance | Clinical response objectives held |
| TEST-ANL-017 | FR-ANL-DWH-001 | Analytical identity attempts OLTP connection; analytics platform stopped | Security / Resilience | Connection refused and logged; clinical workflows unaffected |
| TEST-ANL-018 | FR-ANL-DWH-002 | Duplicate delivery; consumer outage; approved replay after mapping change | Integration | One analytical effect; no loss; curated rebuilt, prior versions kept |
| TEST-ANL-019 | FR-ANL-DWH-003 | Batch with valid, invalid and duplicate records | Functional | Counts balance; invalid quarantined with actionable reason |
| TEST-ANL-020 | FR-ANL-DWH-003 | Corrected result; patient merge then unmerge | Integration | New version current, prior kept; attribution correct after each event |
| TEST-ANL-021 | FR-ANL-DWH-004 | Dashboard on uncertified product; source change after snapshot | Functional | Publication refused; snapshot unchanged |
| TEST-ANL-022 | FR-ANL-DQL-001 | Trace sample metric to source; impact analysis of mapping change | Functional | Trace reaches source events with versions; dependents listed |
| TEST-ANL-023 | FR-ANL-DQL-002 | Product refresh with rule failures | Functional | Score published; breach raises item; dashboard shows six Appendix B indicators |
| TEST-ANL-024 | FR-ANL-DQL-003 | Drop records before reconciliation; close item without reason | Functional | Reconciliation fails and item created; closure refused |
| TEST-ANL-025 | FR-ANL-RDX-001 | Attempt preparation without approval | Security | Job does not run |
| TEST-ANL-026 | FR-ANL-RDX-001 | Access after expiry; refresh after secondary-use restriction | Security / Privacy | Access denied; records excluded |
| TEST-ANL-027 | FR-ANL-RDX-002 | Prepare extract with approved profile; compare pseudonyms across unrelated extracts | Privacy | Identifiers treated per profile; pseudonyms differ |
| TEST-ANL-028 | FR-ANL-RDX-002 | Data set with cell below minimum size | Privacy | Release blocked |
| TEST-ANL-029 | FR-ANL-AIG-001 | Propose use case with autonomous order change | Functional / Safety | Rejected |
| TEST-ANL-030 | FR-ANL-AIG-001 | Clinical use case without safety assessment; suspend approved use case | Functional / Safety | Approval blocked; gateway refuses after suspension |
| TEST-ANL-031 | FR-ANL-AIG-002 | AI request for a patient the user may not access | Security | No data retrieved; denial logged |
| TEST-ANL-032 | FR-ANL-AIG-002 | Use expired or out-of-scope credential; AI attempts write or database connection | Security | Refused |
| TEST-ANL-033 | FR-ANL-AIG-003 | Display AI draft; end session without disposition | Safety | Labelled; nothing committed |
| TEST-ANL-034 | FR-ANL-AIG-003 | Accept draft and inspect owning-domain record | Integration / Safety | Human is author of record; AI-assisted provenance present |
| TEST-ANL-035 | FR-ANL-AIG-004 | Change prompt template; deploy unapproved version | Functional | New version created; deployment refused |
| TEST-ANL-036 | FR-ANL-AIG-004 | Drive monitored measure over suspension threshold | Safety | Version Suspended; gateway stops serving |
| TEST-ANL-037 | FR-ANL-AIG-005 | Stop AI service and policy service in turn during host workflows | Resilience / Safety | Workflows complete without AI; no data retrieved |
| TEST-ANL-038 | FR-ANL-AIG-005 | Malformed model output; global switch off | Safety | Output withheld; AI unavailable; core workflows normal |
| TEST-ANL-039 | FR-ANL-SEM-001 | Overlapping effective period; self-approval; version selection by period | Functional | Rejected; rejected; correct version used |
| TEST-ANL-040 | FR-ANL-SEM-002 | Two scopes run same report; restricted column; policy service down; patient-level export | Security | Rows filtered; column masked; fail closed; export audited |
| TEST-ANL-041 | FR-ANL-RUC-001 | Occupancy from known bed events; capacity change next month | Reconciliation | Reconciles to source; history uses capacity effective at the time |
| TEST-ANL-042 | FR-ANL-MGT-001 | Issue, reproduce and distribute a monthly report; definition change mid-series | Functional / Security | Immutable issue; identical reproduction; trend break marked; unauthorized recipient excluded |
| TEST-ANL-043 | FR-ANL-MGT-002 | Compute scorecard; unapproved denominator | Functional | Ten metrics with components; target withheld; notice present |
| TEST-ANL-044 | NFR-ANL-001, NFR-ANL-011 | Dashboard load test; restore governance metadata and rebuild curated data from raw | Performance / Recovery | Targets met or variance recorded; rebuild reconciles |
| TEST-ANL-045 | UX-ANL-001 to UX-ANL-006 | Keyboard, screen reader, greyscale and locale checks on catalogue screens | Accessibility | Conformance evidence |
| TEST-ANL-046 | NFR-ANL-012 | Export data products, definitions, lineage and configuration; independent parse | Portability | Export complete and parseable |
| TEST-ANL-047 | FR-ANL-CQI-001 | Starter indicator set on known-answer data: emergency caesarean sections with decision to incision of 25 and 35 minutes; JKN out of scope | Functional | All 18 starter definitions registered; INM 4 counts only the 25-minute case as met; INM 9 shows "Not applicable"; monthly issue ready by the 10th |
| TEST-ANL-048 | FR-ANL-DQL-003, IF-ANL-002 | FinancialControlTotalsReported one ChargeCaptured higher than received; no ClinicalControlTotalsReported by 03:00 local; corrected total later | Reconciliation | ReconciliationVarianceDetected and a stewardship item for the financial day; clinical products show "Not reconciled" and the administrator is alerted; corrected total re-runs the comparison |
| TEST-ANL-049 | CFG-ANL-016 | Disposal run over raw data older than 90 days, a daily snapshot older than 13 months, a month-end snapshot of 9 years and a raw range under legal hold | Functional | Expired raw data and the daily snapshot removed and logged; month-end snapshot and held range kept |
| TEST-ANL-050 | FR-ANL-MGT-002 | Load helpdesk and feedback extracts; a role group with 20 System Usability Scale responses | Functional / Privacy | Helpdesk trends and ratings shown; no ticket text, comment or name in the platform; the 20-response score is not shown |
15.3 Acceptance Criteria¶
The domain is accepted for a release when all of the following hold.
- All approved Must requirements in the release scope pass verification or have an approved, time-bound waiver (ACC-001).
- Dashboard metrics reconcile to source transactions for every published dashboard (ANA-001).
- A historical report has been reproduced using its metric version (ANA-002).
- The combined load test shows analytics cannot starve clinical transactions (ANA-003).
- A sampled dashboard metric has been traced to source (ANA-004).
- For any released extract, privacy review and re-identification risk controls are documented (ANA-005).
- Feed contracts with each in-scope source domain pass contract, duplicate, outage and replay tests.
- Security and privacy assessment passes, with no unresolved critical or high vulnerability lacking formal risk acceptance (ACC-003).
- Performance targets are met or variances are formally accepted.
- Migration of legacy definitions and history is reconciled (section 7.7).
- If any AI feature is enabled: use case approved with all required assessments, human-review and fail-closed tests pass, and clinical governance has approved the clinical AI use cases.
- Runbooks, monitoring, stewardship process and support escalation are operational (ACC-009).
- Outstanding risks are formally accepted or resolved.
15.4 Requirement Verification Matrix¶
| Requirement ID | Test ID | Verification Method | Result | Evidence |
|---|---|---|---|---|
| FR-ANL-OPS-001 | TEST-ANL-001, TEST-ANL-002 | Test / Inspection | Pending | To be recorded |
| FR-ANL-OPS-002 | TEST-ANL-003, TEST-ANL-004 | Test | Pending | To be recorded |
| FR-ANL-OPS-003 | TEST-ANL-005, TEST-ANL-006 | Test | Pending | To be recorded |
| FR-ANL-OPS-004 | TEST-ANL-007, TEST-ANL-008 | Test | Pending | To be recorded |
| FR-ANL-CQI-001 | TEST-ANL-009, TEST-ANL-010, TEST-ANL-047 | Test | Pending | To be recorded |
| FR-ANL-CQI-002 | TEST-ANL-011, TEST-ANL-012 | Test / Inspection | Pending | To be recorded |
| FR-ANL-FRR-001 | TEST-ANL-013, TEST-ANL-014 | Test | Pending | To be recorded |
| FR-ANL-FRR-002 | TEST-ANL-015 | Test | Pending | To be recorded |
| FR-ANL-RUC-001 | TEST-ANL-041 | Test | Pending | To be recorded |
| FR-ANL-DWH-001 | TEST-ANL-016, TEST-ANL-017 | Test / Analysis | Pending | To be recorded |
| FR-ANL-DWH-002 | TEST-ANL-018, TEST-ANL-049 | Test | Pending | To be recorded |
| FR-ANL-DWH-003 | TEST-ANL-019, TEST-ANL-020 | Test | Pending | To be recorded |
| FR-ANL-DWH-004 | TEST-ANL-021 | Test / Inspection | Pending | To be recorded |
| FR-ANL-DQL-001 | TEST-ANL-022 | Test | Pending | To be recorded |
| FR-ANL-DQL-002 | TEST-ANL-023 | Test | Pending | To be recorded |
| FR-ANL-DQL-003 | TEST-ANL-024, TEST-ANL-048 | Test | Pending | To be recorded |
| FR-ANL-SEM-001 | TEST-ANL-039, TEST-ANL-013 | Test | Pending | To be recorded |
| FR-ANL-SEM-002 | TEST-ANL-040 | Test | Pending | To be recorded |
| FR-ANL-RDX-001 | TEST-ANL-025, TEST-ANL-026 | Test / Inspection | Pending | To be recorded |
| FR-ANL-RDX-002 | TEST-ANL-027, TEST-ANL-028 | Test | Pending | To be recorded |
| FR-ANL-AIG-001 | TEST-ANL-029, TEST-ANL-030 | Test / Inspection | Pending | To be recorded |
| FR-ANL-AIG-002 | TEST-ANL-031, TEST-ANL-032 | Test | Pending | To be recorded |
| FR-ANL-AIG-003 | TEST-ANL-033, TEST-ANL-034 | Test | Pending | To be recorded |
| FR-ANL-AIG-004 | TEST-ANL-035, TEST-ANL-036 | Test / Inspection | Pending | To be recorded |
| FR-ANL-AIG-005 | TEST-ANL-037, TEST-ANL-038 | Test | Pending | To be recorded |
| FR-ANL-MGT-001 | TEST-ANL-042 | Test | Pending | To be recorded |
| FR-ANL-MGT-002 | TEST-ANL-043, TEST-ANL-050 | Test / Inspection | Pending | To be recorded |
← 14. Technical and Architectural Constraints | Contents | Identifier index | 16. Implementation and Deployment Considerations →