docs: add notification and concurrency test procedures

This commit is contained in:
Siavash Sameni
2026-06-06 10:57:44 +04:00
parent 9267961909
commit bee91dd01f
6 changed files with 552 additions and 16 deletions

View File

@@ -102,6 +102,50 @@ Add Playwright tests for:
- payment submitted screen waits for scanner confirmation;
- paid socket/poll fallback transitions to success.
## P1 - Notification Assertions
Turn [[Notification Assertion Procedure]] into reusable E2E helpers:
- capture per-user notification baseline;
- poll `GET /api/notifications` and `GET /api/notifications/unread-count`;
- optionally attach Socket.IO clients for buyer/seller/admin actors;
- fail on wrong-recipient notifications;
- record known notification gaps with route/action and expected recipient;
- include notification latency in every E2E report.
Acceptance tests:
| ID | Expected |
|---|---|
| NOTIF-E2E-001 | New seller offer creates a buyer notification and unread-count increment. |
| NOTIF-E2E-002 | Buyer offer acceptance creates selected seller notification. |
| NOTIF-E2E-003 | Seller delivery creates buyer notification. |
| NOTIF-E2E-004 | Buyer delivery confirmation creates seller notification. |
| NOTIF-E2E-005 | Missing `pending_payment` notification is reported as a known gap, not a silent pass. |
## P1 - Concurrency and Performance Profile
Implement [[Concurrency and Performance Profile]] as an executable runner and
report generator:
- worker abstraction for one isolated buyer/sellers/payment/delivery flow;
- barrier start for simultaneous workers;
- ramp stages `1, 2, 4, 8, 16, 32`;
- JSON result per worker;
- markdown performance profile report per run;
- infrastructure snapshots before/during/after each stage;
- stop-condition enforcement.
Acceptance tests:
| ID | Expected |
|---|---|
| PERF-CONC-001 | C1 completes with all notification assertions. |
| PERF-CONC-002 | C2/C4 detect no cross-worker state leakage. |
| PERF-CONC-003 | Report includes p50/p95/p99 API, scanner, notification, and total timings. |
| PERF-CONC-004 | Runner stops the ramp on P0 notification/payment/ledger correctness failure. |
| PERF-CONC-005 | Runner separates live-chain mode from scanner-fixture/API-only modes. |
## P1 - CI and Deployment
Add a deployment smoke checklist artifact after every pipeline:
@@ -142,4 +186,3 @@ Add dashboards/log queries for:
5. Add release-policy tests.
6. Resolve dispute route/policy gaps.
7. Add dispute-to-release/refund E2E tests.