# VBMS — Test Coverage Matrix

**Date:** 2026-10-19
**Axes:** Module (54 from module-inventory.md) × Test level (Automated API / Static audit / Manual-UAT) × Role (10 roles).
**Evidence:** automated numbers from `qa/04-automation/results/api-test-results.json` (218 tests, **218 pass / 0 fail** after fixes) + `qa/04-automation/fix-verification-probes.mjs` (17/17 pass).

---

## 1. Coverage by module (maps to module-inventory.md §1)

Status: **Covered-A** = automated API tests executed; **Covered-S** = static audit only (UI/UX or schema); **Pending-M** = manual/UAT designed, not yet executed; **Partial** = combination.

| # | Module | Route | API tests | Static | Manual | Overall | Notes |
|---|---|---|---|---|---|---|---|
| 1 | States | /master-setup/states | Covered-A (9) | — | — | **Covered-A** | incl. boundary + SQLi |
| 2 | Locations | /master-setup/locations | Covered-A (6) | — | 1 | Partial | map search pending |
| 3 | Customers | /master-setup/customers | Covered-A (8) | — | — | **Covered-A** | |
| 4 | Customer Contacts | nested | Covered-A (4) | — | 1 | Partial | scoped-list UAT pending |
| 5 | Customer Branches | nested | Covered-A (3) | — | 1 | Partial | |
| 6 | Branch Locations | nested | Covered-A (1) | — | 1 | Partial | |
| 7 | Materials | /master-setup/materials | Covered-A (8) | — | 4 | Partial | GST/monthly-order UAT |
| 8 | Material Types | inline | Covered-A (4) | — | — | **Covered-A** | |
| 9 | Service Types | /master-setup/serviceTypes | Covered-A (5) | — | — | **Covered-A** | |
| 10 | Mail Formats | /master-setup/mailFormats | — | — | 5 | Pending-M | |
| 11 | Feedback Forms | /master-setup/feedbackForms | — | — | 6 | Pending-M | |
| 12 | Companies | API only | Covered-A (5) | — | — | **Covered-A** | |
| 13 | MIS — Members | /mis/members | Covered-A (10) | — | 4 | Partial | D-001 fixed/verified |
| 14 | MIS — Documents | /mis/documents | — | — | 3 | Pending-M | |
| 15 | MIS — Member Locations | /mis/memberLocations | — | — | 2 | Pending-M | |
| 16 | Jobs | /job-management/all | Covered-A (26) | — | 6 | Partial | core lifecycle covered |
| 17 | My Assignments | /job-management/my-assignments | Partial (via by-member) | — | 3 | Pending-M | |
| 18 | Tickets (Daily Tasks) | /job-management/all-tickets | Covered-A (in jobs set) | — | 3 | Partial | photos/checklists pending |
| 19 | Attendance (Daily) | /attendance/attendance | Covered-A (10) | — | 2 | Partial | D-002 fixed/verified |
| 20 | Leaves | /attendance/leaves | Covered-A (6) | — | — | **Covered-A** | |
| 21 | Capacity | /attendance/capacity | Covered-A (2) | — | — | **Covered-A** | |
| 22 | VBMS Review | /reviews/vbms | Covered-A (7) | — | 1 | Partial | |
| 23 | CUB Review | /reviews/cub | — | — | 3 | Pending-M | approve/comment/feedback |
| 24 | Feedback Requests | /reviews/feedback | — | — | 5 | Pending-M | |
| 25 | Redo | modal action | Covered-A (in reviews) | — | — | **Covered-A** | D-013 fixed/verified |
| 26 | Public Feedback | /feedback/:token | — | — | 3 | Pending-M | |
| 27 | Users | /users-roles/users | Covered-A (13) | — | — | **Covered-A** | R-01 stored-by-design evidence; R-05 role-whitelist probes PASS |
| 28 | Roles & Permissions | /users-roles/roles | Covered-A (list) | Covered-S | 1 | Partial | matrix editor UAT |
| 29 | Scopes | /users-roles/scopes | — | Covered-S | 2 | Pending-M | |
| 30 | Login Sessions | /users-roles/login-sessions | — | — | 1 | Pending-M | |
| 31 | Preferences | /settings/personalization | Covered-A (2) | Covered-S (font-scale defect) | — | Partial | DEF-UI-001 |
| 32 | Settings — General | /settings/general | Covered-A (3) | — | 1 | Partial | |
| 33 | Settings — Notifications | /settings/notifications | — | — | 1 | Pending-M | |
| 34 | Email Integration | Settings tab | — | — | 1 | Pending-M | R-06 env-limited |
| 35 | Holiday Calendars | /holiday-calendar/calendars | — | — | 6 | Pending-M | |
| 36 | Holiday Overrides | /holiday-calendar/overrides | — | — | 2 | Pending-M | |
| 37 | Holiday Rules | nested | — | — | 3 | Pending-M | |
| 38 | Notifications | /notifications | — | — | 3 | Pending-M | |
| 39 | Profile | /profile | Covered-A (change-pwd 4) | — | 3 | Partial | |
| 40–54 | Remaining screens (dashboards, MIS reports, calendar, ticket report, audit, search, asset-dead-code, etc.) | various | Partial (sidebar/daily-tasks/stats) | Covered-S | ~12 | Pending-M | see module-inventory |

**Totals:** 218 automated tests executed (**218 pass / 0 fail**); 17/17 manual fix-verification probes pass; 30 static UI/UX defects (open, no-redesign constraint); ~48 manual/UAT cases pending.

## 2. Coverage by role (executed RBAC evidence)

| Role | Positive paths executed | Negative paths executed | Notes |
|---|---|---|---|
| super_admin | Full CRUD across all automated modules | — | Bypasses all checks by design |
| admin | Implied via super_admin-level grants | — | |
| coordinator | view states/jobs; create job | create user → 403; create state via fm path | QA-RBAC PASS |
| field_member | — | state/user/audit/customer/job create, review view, settings edit → 403 (7 negatives) | QA-RBAC PASS |
| vbms_reviewer | reviews/pending → 200 | — | QA-RBAC PASS |
| cub_reviewer | (login created; full CUB flows pending manual) | — | UAT |
| customer_admin | — | — | UAT pending (R-05 customer-side grant still static-only) |
| customer_viewer | view jobs → 200 | create job/state → 403 | QA-RBAC PASS |
| customer_operator | — | — | UAT pending |
| house_keeping | view settings → 200 | edit settings → 403 | QA-RBAC PASS |
| anonymous | — | /states, /jobs → 401; /me → 401 | QA-RBAC/AUTH PASS |

## 3. Coverage by test type

| Type | Count | Pass rate (post-fix re-run) |
|---|---|---|
| Functional API (CRUD) | ~120 | 100% (D-001 fixed) |
| Workflow/state-transition | ~40 | 100% |
| Security/RBAC | ~30 | 100% (D-003 signed-URL tests added; D-004 by-design) |
| Boundary/validation | 10 | 100% (D-005..008 fixed; limit clamped to 5000) |
| Fix-verification probes (R-04/05/07) | 17 | 100% |
| Static UI/UX audit | 30 findings | n/a (audit, not pass/fail) |
| Schema/migration audit | 8 findings | 7 fixed/verified, 1 accepted (D-016 dead file) |
