Skip to content

Testing

rogerjeasy edited this page Oct 19, 2026 · 1 revision

Testing

More than 6,700 automated tests, the television's screens rendered by React itself, property tests on the two rules that matter most, and live checks against the deployed stack.

Real and simulated

Layer Rule
Unit and property tests Fixtures are expected. They live under __tests__ and never ship.
The running product No mock is reachable. npm run check:no-mocks fails the build otherwise, and reads every import the way TypeScript does, so named, re-exported, bare, dynamic and require imports are all caught.
The demo Simulated devices and a marked demo home; everything between is the deployed stack.

What is tested, and how

Area How
The natural-break engine Property tests over synthetic playback timelines with fast-check: no deferred card ever shows mid-scene, the door shows in any state, a card shown mid-film holds it until answered.
The Guardian Property tests over the policy (no protected class reaches the family under any policy), over the lexicon (no listed phrase is cleared, however written), and through the real tool server, the television routes and the assistant. 10,000 cases in CI.
Model output Each model reply passes a tested validator. A reply that fails is dropped: the door card keeps its first sentence, and the week keeps its counted facts.
Contracts Ring responses recorded from the Playground, redacted and replayed; every tool called over HTTP and validated against its output schema; the household-from-token rule held by server, API and pairing tests.
The television's screens Every Vega screen is rendered in tests by React's own reconciler, with hooks, effects and state running. Every card type is drawn in all four Easier to see settings and in English and Spanish, and held to the calm limits: no more than three labelled buttons, nothing under 32 pt, 7:1 contrast.
The browser television Run in a sandboxed context against fake sockets and timers, including losing the channel and getting it back.
Infrastructure Tests read the Terraform: the deploy role's explicit denials, the per-route throttles, the scaling cap and the spend brake.
Transport The WebSocket and MQTT channels are tested for heartbeat, backoff, guarded parsing and state changes.

Device testing

There is no physical Fire TV or Ring device. Live checks ran on the Vega Virtual Device, the Fire OS build on the Android TV emulator and the browser television, against the deployed stack. Screenshots are in docs/screenshots. Legibility at three metres, a real panel's contrast and sound have not been checked. The guides are SIMULATOR-TESTING-GUIDE.md and PRODUCTION-TESTING-GUIDE.md.

Continuous integration

flowchart LR
    pr["Pull request"] --> ci["ci.yml<br/>verify, property tests"]
    ci --> main["Merge to main"]
    main --> edge["deploy-edge.yml<br/>Lambdas, web apps,<br/>Terraform apply"]
    main --> agent["deploy-agent.yml<br/>build and pin images,<br/>Terraform apply,<br/>wait for App Runner"]
    main --> fire["tv-fireos.yml<br/>Fire OS APK"]
    edge --> smoke["smoke.yml<br/>live checks"]
    agent --> smoke
Loading

Clone this wiki locally