Trường Số QA/12 Non-functional requirements
Trường Số · QA test suite · Phase 1 · 10/09/2026

12 · Non-functional requirements

Test cases for PRD 12. Every case names the fixture data it needs (see the dashboard fixtures table), numbered steps, and one observable expected result. Trace points to the user story or rule in the PRD.

Key facts, origin and limits
Cases
38
P0 / P1
3 / 22
Regression pack
9
PRD
12 Non-functional requirements
Phase
P1

Drafted by an AI assistant in a single session on 10/09/2026 as part of the Trường Số QA suite, under the request quoted verbatim on the dashboard. A proposal for team review, not a sign-off.

Sources

  • The Trường Số PRD set (Draft v1, 10/09/2026): user stories, screen tables, business rules and permission matrices, plus the Cloud theme reference.

Limits

  • Phase 1 (authoring) only. Cases are executed in Phase 2 against the local build; results are recorded in testcases.json and runs/run-1/, and every result field is still not_run.
  • Cases inherit any open question or inconsistency in the PRDs they trace to.

1Summary

P0
3
P1
22
P2
9
P3
4
Typefunctionalui-uxedgenegativeregressionflowa11yperfsecurityi18n
Count82000053155

2Test cases

IDTitleTypePriorityPhasePreconditionsStepsExpected resultPRD traceData neededRun 1
TS-NFR-001List pages time-to-interactive and API p95perfP1P1Big Center, branch A, 4G throttling in Playwright.
  1. Load /students, /finance/tuition, /attendance with a 50-row page; record trace and API timings.
TTI ≤ 2.0 s; API p95 ≤ 400 ms per 50-row page.12 §2Fixtures belowNot run
TS-NFR-002No client-side filtering of full datasetsperfP1P1Network log.
  1. Type a search on /students; change a filter.
Each change issues a server request with q/filters; no request fetches more than limit rows.12 §2 design rulesFixtures belowNot run
TS-NFR-003Dashboard initial JS bundle ≤ 350 KB gzippedperfP2P1Build output.
  1. Read next build output for the dashboard route; or measure transferred JS on first load.
≤ 350 KB gzipped; module routes are code-split.12 §2 bundleFixtures belowNot run
TS-NFR-004Health endpointfunctionalP1P1Server running.
  1. GET /api/health.
200 with checks for database, queue, object storage (stubbed statuses).12 §10Fixtures belowNot run
TS-NFR-005Login lockout after 5 failuressecurityP1P1Login page.
  1. Enter a wrong password 5 times for U-ACAD-A; then the correct one.
6th attempt refused with "Tài khoản tạm khoá 15 phút"; correct password rejected until the lock ends.12 §3 rate limitsFixtures belowNot run
TS-NFR-006Write rate limit 60/min per usersecurityP2P1API.
  1. Send 61 POST requests within a minute.
61st returns 429 with Retry-After.12 §3Fixtures belowNot run
TS-NFR-007Session expiry after 30 days inactivity and password change revokes sessionssecurityP2P1Two sessions for U-ACAD-A.
  1. Change the password in session 1.
  2. Use session 2.
Session 2 rejected (401 → login).12 §3 authenticationFixtures belowNot run
TS-NFR-008Auth token never reaches third-party originssecurityP1P1Network log on any page.
  1. Inspect all requests.
Auth token header only on same-origin /api/v3 proxy calls; no request to external origins carries it.12 §3Fixtures belowNot run
TS-NFR-009Security headers presentsecurityP1P1curl.
  1. curl -I the login page and an authenticated page.
Content-Security-Policy present without unsafe inline third-party scripts; Strict-Transport-Security; cookies SameSite=Lax; X-Content-Type-Options nosniff.12 §3 application securityFixtures belowNot run
TS-NFR-010Server-side permission checks (UI hiding is not relied on)securityP0P1API as U-TEACH.
  1. Call 10 write endpoints outside the teacher's permissions (create student, create class, pay, void, approve, invite user, change role, delete sheet, create expense, transfer student).
All return 403; nothing changes.12 §3 authorisationFixtures belowNot run
TS-NFR-011Upload security: MIME allow-list, size, signed URLs 15 minsecurityP1P1Any upload point.
  1. Upload .svg renamed .png; 21 MB pdf; open a signed URL after 16 min.
Content-sniffed rejection; size rejection; expired URL 403.12 §3 uploadsFixtures belowNot run
TS-NFR-012OWASP basics: XSS in names and notessecurityP1P1Student name "<img src=x onerror=alert(1)>".
  1. Create the student; view list, profile, attendance sheet, message preview.
Rendered as text everywhere; no script executes.12 §3 ASVSFixtures belowNot run
TS-NFR-013Dependency scan clean of critical CVEssecurityP2P1Repo.
  1. Run npm audit (or the CI scan).
Zero critical.12 §3Fixtures belowNot run
TS-NFR-014Consent captured at every guardian entry pointsecurityP0P1Conversion wizard step 2, student form, guardian add, import, portal.
  1. Create a guardian through each path with consent ticked.
A consent row with type, version, granted_at, channel (web/portal/paper or import) and actor exists for each; missing consent means no external channel used.12 §4 Art. 11, 12 §11Fixtures belowNot run
TS-NFR-015Consent text is tenant-editable with FLYER defaultfunctionalP2P1/settings (tenant or notifications).
  1. Edit the consent text; open the wizard.
New text and a new version id shown; older consents keep their version.12 §4Fixtures belowNot run
TS-NFR-016No direct messaging to students under 16securityP1P1S1 (age 8) with own phone field filled.
  1. Trigger any message.
Recipient is always a guardian; no message row targets the student.12 §4 Art. 20Fixtures belowNot run
TS-NFR-017Marketing consent separate from service consentfunctionalP1P1Lead form.
  1. Create a lead with the marketing tick box unticked; then ticked.
marketing_consent_at null then set; bulk ZNS marketing skips the first.12 §4 marketing consentFixtures belowNot run
TS-NFR-018Anonymise keeps finance for 10 yearssecurityP1P1S5 anonymised with a paid invoice.
  1. Open the invoice and cash book.
Rows intact with "Học viên đã xoá"; PDF receipt still retrievable.12 §4 deletionFixtures belowNot run
TS-NFR-019Cross-border disclosure in consent textfunctionalP3P1Default consent text.
  1. Read it.
Mentions storage in Singapore (ap-southeast-1).12 §4 cross-borderFixtures belowNot run
TS-NFR-020Mandatory audited actions all write entriessecurityP0P1Perform each: finance write, attendance edit after day, student status change, guardian contact change, permission change, personal-data export, login from a new device.
  1. Open the audit log after each.
One entry per action with actor snapshot, action code, entity, before/after, ip, user_agent, request_id; money and status fields always included.12 §6, 12 §11Fixtures belowNot run
TS-NFR-021Audit export per tenant as CSVfunctionalP2P1Owner.
  1. Export the audit log.
CSV with all columns; itself logged as an export.12 §6Fixtures belowNot run
TS-NFR-022Restore drill report availablefunctionalP3P1Release note.
  1. Ask for the restore drill evidence.
Written report for the release week snapshot exists (out of scope for local run; record N/A with reason).12 §7, 12 §11Fixtures belowNot run
TS-NFR-023Date and time formatsi18nP1P1Any list.
  1. Read dates and times in vi and en.
dd/MM/yyyy and HH:mm 24-hour in both; timezone Asia/Ho_Chi_Minh; API stores UTC.12 §8Fixtures belowNot run
TS-NFR-024Vietnamese collation in sortingi18nP1P1Students "Đặng", "Dương", "Đinh", "Doãn".
  1. Sort by name.
Order Doãn, Dương, Đặng, Đinh (D before Đ, accents ignored for equal base) per ICU vi.12 §8 collationFixtures belowNot run
TS-NFR-025Accent-insensitive searchi18nP1P1/students.
  1. Search "tran chi".
Finds "Trần Chi".12 §8Fixtures belowNot run
TS-NFR-026No raw i18n keys anywherei18nP1P1Crawl all routes in vi and en.
  1. Grep page text for patterns like "[a-z]+\.[a-z]+\.[a-z]+" that match message keys.
Zero matches.12 §8Fixtures belowNot run
TS-NFR-027Hard-coded English removed from settings and form bodiesi18nP1P1vi locale.
  1. Open every settings page and every form drawer.
No English UI strings in vi (except brand names and codes).00 §6 inconsistencyFixtures belowNot run
TS-NFR-028Large font toggle scales the console 110%a11yP3P1Tenant setting "Cỡ chữ lớn".
  1. Enable it.
Base font 13.5 → ~14.9 px; layout intact.12 §9Fixtures belowNot run
TS-NFR-029axe run with zero serious violations on main screensa11yP1P1Playwright + axe-core.
  1. Run on /dashboard, /students, /students/:id, /classes, /classes/:id, /attendance, sheet, /finance/tuition, /finance/debt, /settings/users.
Zero serious or critical violations.12 §11Fixtures belowNot run
TS-NFR-030Contrast ≥ 4.5:1 for texta11yP1P1Any page.
  1. Check ink and secondary text against backgrounds.
Ink and muted colours pass 4.5:1 on white and on #fafafa; chip text passes on chip backgrounds. Note: PRD 12 cites #212B36/#637381 while the Cloud reference uses #1b1b1f/#71717a; either passes; record which is used.12 §9, Cloud theme §3Fixtures belowNot run
TS-NFR-031Keyboard walkthrough of the daily loopa11yP1P1Keyboard only.
  1. Create a student, enroll, open attendance sheet and save, create an invoice, record a payment.
Every step completable with keyboard; focus ring always visible; no trap; modals return focus to the trigger on close.12 §9, 12 §11Fixtures belowNot run
TS-NFR-032Tables have proper headers and forms have labelsa11yP1P1Any table and form.
  1. Inspect th scope and label/for or aria-labelledby.
All columns have th; all inputs labelled; error text linked by aria-describedby.12 §9Fixtures belowNot run
TS-NFR-033Browser matrixui-uxP2P1Chrome, Edge, Safari, Firefox latest two.
  1. Smoke the daily loop in each (Playwright channels where available).
No layout or functional differences.12 §9 browsersFixtures belowNot run
TS-NFR-034Feature flag off hides P2 modules cleanlyfunctionalP1P1Flags.
  1. Turn inventory off.
Nav hides Kho; /inventory shows "Tính năng chưa bật"; no console errors.12 §10 feature flagsFixtures belowNot run
TS-NFR-035Logs contain no personal datasecurityP1P1Server log stub.
  1. Create a guardian; send a message; grep logs for the phone and name.
No matches (masked).12 §10Fixtures belowNot run
TS-NFR-036Error tracking code shown to userui-uxP2P1Force an API 500.
  1. Observe the UI.
Toast/page with code TS-5xxx and Thử lại; no raw error JSON.12 §10Fixtures belowNot run
TS-NFR-037Analytics events exclude student personal datasecurityP2P1Analytics stub.
  1. Create a student; save attendance.
Payloads contain ids and buckets, no names or phones.12 §10Fixtures belowNot run
TS-NFR-038Maintenance banner announces windowsfunctionalP3P1Set a maintenance window in the stub.
  1. Load any page.
In-app banner with the window time appears 48 h ahead.12 §2 availabilityFixtures belowNot run

Trường Số (truongso.net) · FLYER internal