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