CR-TST-010 · MASTER TEST PLAN & TEST SUITE
Master Test Plan & Test Suite
Test strategy, levels, environments, automation split, defect management and a structured suite of 1,000+ test cases across all modules — including the UAT subset.
Implementation status — planned catalogue vs. current automation. The 1,000+ structured cases below are the planned test catalogue (the target suite + UAT subset), not an executed automated suite. The automation that exists in the repo today is the
e2e/ harness — custom Node scripts (api/*.mjs API suites, dashboard-smoke.mjs, dashboard-qa.mjs, RBAC checks) run against a live, seeded system. Unit/integration/contract suites, a CI test pyramid and coverage gates are roadmap; coverage figures here are targets.Test Strategy
Quality is built in at every level — from unit tests in CI to business UAT before go-live. Testing traces to the SRS functional requirements and PRD acceptance criteria.
| Level | Scope | Owner | Mode |
|---|---|---|---|
| Unit | Functions, rules, calculations. | Engineering | Automated (CI) |
| Integration | Service ↔ DB ↔ queue ↔ partner stubs. | Engineering / QA | Automated |
| API / Contract | Endpoint behaviour vs OpenAPI. | QA | Automated |
| System (E2E) | Cross-module business flows. | QA | Automated + Manual |
| Performance | Throughput, latency, soak. | QA / SRE | Automated (tooling) |
| Security | SAST/DAST, RBAC, pen-test. | Security | Automated + Manual |
| UAT | Business acceptance & pilot. | the Bank business | Manual |
| Regression | Stability across releases. | QA | Automated |
Test Suite Summary
Coverage by Module
| Code | Module | Total | Automated | Manual | UAT | P0/P1 |
|---|
Environments & Data
| Phase | Environment | Data | Gate |
|---|---|---|---|
| Unit / Integration | DEV | Synthetic | Coverage ≥ 80%, all green. |
| System / API | SIT | Masked / synthetic | All P0 pass, no open P0 defects. |
| Performance / Security | PRE-PROD | Masked, prod-like volume | NFR targets met; no critical vulns. |
| UAT / Pilot | UAT | Masked production-like | Business sign-off on UAT subset. |
Entry & Exit Criteria
| Gate | Entry | Exit |
|---|---|---|
| System test | Build deployed to SIT; smoke pass. | 100% P0 & ≥95% P1 pass; no open P0/P1. |
| UAT | System test exit met; UAT data ready. | UAT subset pass; business sign-off; known issues accepted. |
| Go-live | UAT sign-off; perf & security clear; DR tested. | Cutover checklist complete (see CR-IMP-011). |
Automation Approach
- Automated (target ~70%): unit, integration, API/contract, regression, data-driven functional & boundary cases — run in CI on every change and nightly.
- Manual (the remainder, a few hundred cases): exploratory, complex UAT journeys, usability, some negative/security and visual checks.
- Tooling: unit/integration in the service stack; API tests from the OpenAPI contract; E2E with a browser-automation framework; performance with a load-testing tool; security via SAST/DAST + manual pen-test.
Defect Management
| Severity | Definition | Target fix SLA |
|---|---|---|
| S1 | Blocker — financial error, data loss, outage. | Immediate / hotfix. |
| S2 | Major — key function broken, no workaround. | Within sprint. |
| S3 | Minor — workaround exists. | Next release. |
| S4 | Cosmetic / low. | Backlog. |
Sample Detailed Test Cases
Representative fully-specified cases; the complete generated suite follows in §10.
| ID | Pre-condition | Steps | Expected result | Type |
|---|---|---|---|---|
| TS-ACC-0001 | Active Signature card; 2pts/₹100 rule. | Post ₹5,000 eligible POS purchase. | 100 pts credited; ledger entry references txn & rule. | Functional |
| TS-ACC-0002 | Dining 3× accelerator active. | Post ₹2,000 dining (MCC 5812). | 120 pts credited (3× base). | Functional |
| TS-ACC-0003 | Cash advance excluded. | Post a cash-advance txn. | 0 pts; accrual_status = excluded. | Negative |
| TS-ACC-0004 | Cycle cap 5,000 pts; 4,900 already earned. | Post txn earning 300 pts. | 100 pts credited; 200 capped; cap event logged. | Boundary |
| TS-RDM-0001 | Balance 6,000; voucher GV-AMZ-500 = 5,000 pts. | Redeem with valid OTP. | 5,000 debited; voucher issued; history updated. | Functional |
| TS-RDM-0002 | Balance 3,200; voucher = 5,000 pts. | Attempt redemption. | 422 INSUFFICIENT_BALANCE; no debit. | Negative |
| TS-RDM-0003 | Fulfilment partner returns failure. | Redeem; partner errors. | Points auto-reversed; customer notified; exception logged. | Integration |
| TS-ADM-0001 | Maker submits campaign. | Same user attempts approval. | Blocked — self-approval not allowed. | Security |
| TS-ENG-0001 | Event evt-upi-000123 already ingested and rewarded. | Replay POST /api/v1/events with the same eventRef. | 201 with duplicate: true; identical response body; no second scratch card or ledger credit. | Negative |
| TS-ENG-0002 | Account has never sent UPI_TRANSACTION; "First UPI transaction" rule active (first_occurrence). | Post a UPI event above min_amount_minor; then post a second UPI event. | First event matches and issues one ISSUED scratch card (expiresAt = issue + 30 days); second event does not match the first-occurrence rule. | Functional |
| TS-ENG-0003 | UPI_STREAK_3_WEEKLY milestone active; account at 2/3 in current week. | Post the 3rd UPI event in the same ISO week. | milestone_progress → completed → rewarded; streak scratch card issued; a 4th event starts fresh progress, not a second reward in-window. | Functional |
| TS-ENG-0004 | ISSUED scratch card with hidden POINTS prize. | POST /scratch-cards/:id/scratch twice. | Both calls return the same prize and ledgerEntryId; exactly one ACCRUAL ledger credit (source_type scratch_card); balance credited once. | Boundary |
| TS-ENG-0005 | Scratch card past expiresAt (state EXPIRED). | Attempt POST /scratch-cards/:id/scratch. | 409 returned; card stays EXPIRED; no prize revealed; no ledger credit. | Negative |
Complete Generated Test Suite
The full structured suite (auto-generated, traceable to module & requirement). Use the filters to review on screen; printing includes all cases.
| ID | Module | Scenario | Type | Priority | Execution | UAT |
|---|