QA Skills Library / realtime-apps-qa

โšก Realtime & Multi-Account Systems QA Playbook

Used for every feature that has two or more users acting on shared state at the same time (e.g., Med Royale, live tournaments, duel rooms).


๐Ÿ“Œ Core Rules & Setup

  1. Minimum 2โ€“4 Concurrent Accounts:
  2. 2 accounts for simple duels / rooms.
  3. 3โ€“4 accounts for tournaments (to test brackets, byes, and elimination).
  4. Two Browser Profiles / Incognito:
  5. Open side-by-side to avoid cookie/auth bleed.
  6. Repeat โ‰ฅ 3 Times:
  7. Flaky RTDB/Firestore writes and transition glitches only appear on repetition.
  8. Assert Against Database:
  9. Never trust the screen alone. Query Firestore/RTDB directly after each action.
  10. Break It On Purpose:
  11. Tab away, refresh mid-phase, kill network connection, double-click rapidly.

๐Ÿ›ก๏ธ Failure Modes Matrix

Scenario Expected Behavior
Player tab killed mid-FFA Room completes anyway; remaining players receive scores without hanging.
Host closes page mid-round Phase transitions continue automatically via server-driven timers.
Player joins after registration closes Immediate clean rejection message; no half-registered state.
Rapid double-click on join/answer Exactly one write is processed (Idempotent).
Wrong/missing answer Scored 0 without crash; leaderboard still computes accurately.
Client vs Server winner race Server result wins exclusively (Server Authority).
Page refresh mid-duel Player immediately reconnects to same active duel with preserved score.

๐Ÿ“‹ Execution Checklist

[ ] 1. In a staging/emulator environment, clean only the test state you created in Firestore / RTDB (never delete others' data or write to production without Sohail's explicit approval).
[ ] 2. Join Flow โ€” All accounts register and join in correct order.
[ ] 3. Phase 1 (FFA) โ€” All accounts submit answers; verify scores in DB.
[ ] 4. Transition โ€” All players land on countdown/wait screen simultaneously.
[ ] 5. Phase 2 (Brackets) โ€” Matchups generated correctly; byes handled cleanly.
[ ] 6. Duels โ€” Both players see synchronized questions; results match on both screens.
[ ] 7. Finals โ€” Champion displayed; eliminated players see clear elimination screen.
[ ] 8. Final DB Audit โ€” Full dump of room document matches final UI state 100%.

raw Markdown ยท all skills