Testing Strategy
How OpenHuman tests its product - Vitest, cargo test, WDIO E2E. Where each test goes.
Layers
Layer
Where it lives
What it tests
Driver
Decision tree - where does my test go?
Is the change behind the JSON-RPC boundary (in `src/`)?
├─ YES - does it cross domains or talk to external services?
│ ├─ YES → Rust integration (tests/*.rs)
│ └─ NO → Rust unit (next to source)
└─ NO - change is in `app/`
├─ Is it a pure function, hook, slice, or component in isolation?
│ └─ YES → Vitest unit (*.test.tsx co-located)
└─ Is it user-visible AND it crosses UI ⇄ Tauri ⇄ sidecar ⇄ JSON-RPC?
├─ YES → WDIO E2E (app/test/e2e/specs/*.spec.ts)
└─ Is it OS-level (TCC, Gatekeeper, install, OS toasts)?
└─ YES → Manual smoke checklistFailure-path requirement
Mock policy
Determinism rules
What the existing harness gives you
Naming + structure conventions
Pre-merge gates
Not driver-automatable - manual smoke required
Coverage matrix as the contract
When in doubt
Last updated