Domain specifications / D07-PEX / 15. Testing and Verification Requirements
15. Testing and Verification Requirements¶
15.1 Verification Strategy¶
Verification follows PRS 17.1.
- Unit testing. Release rule evaluation, state transitions, scope checks, timer arithmetic in service hours, content-level filtering, idempotency handling.
- Component testing. Each service against stubs of other domains, including fail-closed behaviour when a stub is unavailable.
- Integration testing. Contract tests for IF-PEX-001 to 006 and INT-PEX-001 to 017; event schema validation; duplicate, delayed and out-of-order delivery; reconciliation jobs.
- End-to-end workflow testing. WF-PEX-001 to 007 across domains, including result correction and withdrawal after release, merge and unmerge with linked accounts, and a clinician hold.
- Clinical safety testing. Negative tests for every control in section 11.1; release rule scenario pack; wrong-patient and representative-scope cases.
- Performance testing. Portal peak load alone and combined with Tier 1 workload; notification bursts; event backlog after outage.
- Security testing. Threat model, static and dynamic analysis, dependency scanning, penetration testing of internet-facing endpoints, authorization matrix tests for every role in section 9.2, enrolment and recovery abuse cases (SEC-011).
- Usability testing. Task-based tests with representative patients and representatives, including the non-urgent notice; accessibility audit with keyboard and assistive technology.
- User acceptance testing. Patient representatives, front-desk, scheduling, clinicians, message-pool staff, HIM, billing and privacy officers.
- Operational readiness testing. Monitoring, alerts, exception-list handling, restore, recovery with release reconciliation, support procedures.
Test evidence uses approved synthetic or de-identified data and is retained as PRS 17.3 requires.
15.2 Test Scenario Catalogue¶
| Test ID | Requirement ID | Scenario | Test Type | Expected Result |
|---|---|---|---|---|
| TEST-PEX-001 | FR-PEX-PRT-001 | Representative sends a request naming a patient with no grant. | Security | Refused; denied-access audit event. |
| TEST-PEX-002 | FR-PEX-PRT-002 | Scheduling, consent and audit services each made unavailable in turn; then all PEX services stopped. | Resilience | Unaffected functions work; submissions held and delivered once; no data shown without decisions; core workflows unaffected. |
| TEST-PEX-003 | FR-PEX-ACC-001 | Staff-assisted enrolment with valid, expired and reused invitations. | Functional | One Active link for the valid case; others refused. |
| TEST-PEX-004 | FR-PEX-ACC-001 | Remote enrolment for twins, shared contact details, ambiguous match, identity under review. | Clinical safety | No link created; staff review item; neutral response. |
| TEST-PEX-005 | FR-PEX-ACC-001 | Second enrolment against an already linked identity. | Security | Refused and flagged. |
| TEST-PEX-006 | FR-PEX-ACC-002 | Single-factor session, idle timeout, lockout, recovery, enumeration probe, support-agent view. | Security | Controls behave as in the acceptance criteria. |
| TEST-PEX-007 | FR-PEX-ACC-003 | Grant with limited scope; out-of-scope access; expiry; revocation mid-session; guardian grant for an adult lacking capacity with and without a court order or power of attorney. | Security | Out-of-scope refused; access stops at once on expiry or revocation; no guardian grant is Active without verified evidence, and it ends at the policy maximum. |
| TEST-PEX-008 | FR-PEX-ACC-003 | Grant activation without identity verification; audit of representative actions. | Functional | Activation refused; audit carries both identities. |
| TEST-PEX-009 | FR-PEX-ACC-004 | Merge of two linked identities; unmerge; EncounterCorrected "Reattributed after unmerge" for an encounter with PEX records; a PEX record of the merged period with no encounter; duplicated and out-of-order identity events; open session at suspension; death recorded for a patient with representative grants. |
Clinical safety / Integration | Links suspended as specified; records under the CIN moved to the named identity; the record with no encounter is on the "Unmerge review" tab and hidden from both accounts until assigned; one history change per event; session refused; on death the link and every grant are Revoked and the representatives are pointed to a disclosure request. |
| TEST-PEX-010 | FR-PEX-APT-001, FR-PEX-APT-002 | Request submitted with retry; booked, alternative offered, declined; cut-off; duplicate request. | Integration | One Domain 1 work item; states mirror Domain 1; cut-off and duplicate refused. |
| TEST-PEX-011 | FR-PEX-APT-003 | Reminder schedule; cancellation after scheduling; confirm action; sensitive service; event replay. | Functional | Reminders sent as configured; none after cancellation; confirmation in Domain 1; no service name; no duplicates. |
| TEST-PEX-012 | FR-PEX-REL-001 | Rule "after review": result final but unreviewed, then reviewed. | Clinical safety | Not visible, then Released with a minimal notification. |
| TEST-PEX-013 | FR-PEX-REL-001 | Delay rule with a clinician hold in place when the delay elapses. | Clinical safety | Remains Withheld. |
| TEST-PEX-014 | FR-PEX-REL-001 | Item category with no matching rule; unlabelled item. | Clinical safety | Not released; on unmatched list; most restrictive rule applied. |
| TEST-PEX-015 | FR-PEX-REL-001 | Consent deny; consent service unavailable; review state unavailable. | Clinical safety | Not released in each case. |
| TEST-PEX-016 | FR-PEX-REL-001 | Unapproved rule set activation; rule set rollback; replayed finalized event. | Functional | Activation refused; rollback affects new evaluations only; one decision and one notification. |
| TEST-PEX-017 | FR-PEX-REL-002 | Released numeric result compared field by field with source; mixed-unit trend. | Functional | Fields match; no combined trend. |
| TEST-PEX-018 | FR-PEX-REL-002 | Released result corrected (correction released, and correction held); result withdrawn. | Clinical safety | Corrected shown as current or "being updated"; withdrawn content removed. |
| TEST-PEX-019 | FR-PEX-REL-003, FR-PEX-REL-004 | Portal-releasable and non-releasable classes; amendment; restriction after release; copied secure reference; representative with excluded category; consent withdrawal. | Security / Functional | Only permitted documents listed; amended version shown; restricted item withdrawn; reference refused; excluded items and counts absent. |
| TEST-PEX-020 | FR-PEX-MSG-001 | Send, route, reply, notify, attempt to edit, staff outside pool, representative sender, bad attachment. | Functional / Security | Behaviour as in the acceptance criteria. |
| TEST-PEX-021 | FR-PEX-MSG-002 | Send without acknowledging notice; unanswered thread past response time in service hours, across a weekend and a public holiday, and 1 working day after escalation; unstaffed pool; automatic reply. | Clinical safety | Send blocked; timer counts service hours only; escalation task to the pool supervisor, then to the department head; overdue listing; next-read time shown or compose disabled; automatic reply carries 119 and the response time. |
| TEST-PEX-022 | FR-PEX-FRM-001 | Assignment on booking; draft across version change; validation; immutability; score calculation; cancelled context. | Functional | Behaviour as in the acceptance criteria. |
| TEST-PEX-023 | FR-PEX-FRM-002 | Assign approved item; expired-review item; language fallback; screen-reader access. | Functional / Accessibility | Version recorded; expired item refused; default language with notice; text alternative available. |
| TEST-PEX-024 | FR-PEX-PRO-001 | Submission viewed in chart before review; incorporation; patient-reported medication; replayed event. | Clinical safety | Labelled and separate before review; Domain 3 entry with reviewer and provenance; patient-reported state; one task. |
| TEST-PEX-025 | FR-PEX-PRO-001 | Threshold-crossing score for each default instrument (PHQ-9, GAD-7, EQ-5D-5L, PROMIS-10), including PHQ-9 item 9 above 0; overdue review. | Clinical safety | Priority raised as in CFG-PEX-021; item 9 task to the duty clinician the same day; standard advice text with the urgent-care route; patient never sees the score; overdue listing. |
| TEST-PEX-026 | FR-PEX-PRO-002 | Demographic and record-content correction requests accepted, declined and withdrawn. | Integration | Routed once; owning record unchanged until owner acts; outcome displayed. |
| TEST-PEX-027 | FR-PEX-BIL-001 | Invoice with part payment and credit note; unissued charges; feature disabled; representative with excluded category. | Functional | Values equal Domain 5; adjustments shown separately; unissued hidden; API refuses; generic line label. |
| TEST-PEX-028 | FR-PEX-PRF-001, FR-PEX-PRF-002 | Directive display; withdrawal with re-evaluation; consent service outage; unverified contact point; disabling security notices. | Functional / Security | Matches Domain 10; items re-evaluated; change not recorded; not used; refused. |
| TEST-PEX-029 | FR-PEX-NTF-001 | Release notification at minimal level by SMS and email; replay; representative excluded by sensitivity; permanent failure; link inspection. | Security | No clinical content; no duplicate; no notification; re-verification flag; no patient data in URL. |
| TEST-PEX-030 | FR-PEX-NTF-002 | Reconcile a scripted set of portal actions against audit events; audit service outage; patient account-activity view. | Security | 100% matched; events delivered with original time; representative access listed. |
| TEST-PEX-031 | FR-PEX-ACC-005 | Authorize an application; request a withheld result; revoke; suspend link. | Security / Integration | Scopes shown; withheld item not returned; requests refused after revocation and suspension. |
| TEST-PEX-032 | NFR-PEX-001, NFR-PEX-005 | Portal peak load of the PEX workload profile in section 10 at 2x headroom, alone and with Tier 1 workload. | Performance | Portal targets met; Tier 1 targets unaffected. |
| TEST-PEX-033 | UX-PEX-001 to UX-PEX-009 | Accessibility audit and task-based usability tests with representative patients. | Usability / Accessibility | Agreed criteria met; findings resolved or accepted. |
| TEST-PEX-034 | Section 8.6 | Outage during which a correction, a hold and a consent withdrawal occur; recovery. | Operational readiness | Views resume only after release reconciliation; all three changes applied. |
| TEST-PEX-035 | FR-PEX-BIL-002 | Pay a statement by QRIS, virtual account and card on the provider's test page; return before the result; failed and expired payments; repeated "Pay online"; inspect PEX logs and storage. | Functional / Security | Payment posted by Domain 5 only; "Payment being confirmed" until the result; no double start; no card data in PEX. |
| TEST-PEX-036 | FR-PEX-REL-005 | Active pathway instance before and after clinician release; representative with and without clinical scope; instance discontinued; Domain 9 unavailable. | Functional / Privacy | Nothing shown before release; plain-language plan without internal reasons or staff names after release; plan hidden after discontinuation; unavailable notice and no stale plan. |
| TEST-PEX-037 | EVT-PEX-014 | Publish a day of engagement events; check the control-total event at 01:00 local; re-publish events of that day after a correction. | Integration | Counts per event type equal the events published for the local day; no patient identifiers; corrected totals sent with a higher version and reconciled by Domain 8. |
15.3 Acceptance Criteria¶
The domain is accepted for a release when:
- All Must requirements in the agreed release scope pass verification or have an approved, time-bound waiver (ACC-001), and Should requirements deferred from the release have documented impact, owner and target release.
- WF-PEX-001 to WF-PEX-007 pass end-to-end tests in the enabled scope.
- Every clinical safety test in section 15.2 passes, the PEX hazards are in the hazard log with residual risk owners (SAFE-001), and clinical governance has approved the release rule set, non-urgent notice, response times and clinical forms for go-live.
- Integration contracts with Domains 1, 3, 4, 5, 6, 8 and 10 are validated, including acknowledgement, error handling, replay and reconciliation (ACC-005 pattern).
- Security assessment and penetration test of internet-facing endpoints show no unresolved critical or high vulnerability without formal risk acceptance (ACC-003); the privacy impact assessment is approved.
- Performance, isolation and accessibility targets in section 10 are met or formally accepted.
- Any legacy portal migration is reconciled, or confirmed not applicable.
- PEX data is included in the demonstrated export (ACC-008) and in restore and recovery tests (ACC-006).
- Runbooks, support procedures, staff training and patient help content are complete (ACC-009).
- Open decisions that block the release scope are approved, and outstanding risks are accepted or resolved.
15.4 Requirement Verification Matrix¶
← 14. Technical and Architectural Constraints | Contents | Identifier index | 16. Implementation and Deployment Considerations →