QA Wolf built a low-latency live-streaming system to let testers and automated agents watch and interact with end-to-end test runs in real time across Web, Android, and iOS. The goal was to turn brittle, hard-to-diagnose runs into observable, actionable sessions so humans or AI can kill hung flows or validate flaky fixes as they happen. To meet sub-200ms interactivity and better motion handling, VNC was replaced by WebRTC for one-way encoded video and a bidirectional data channel for inputs. A single React client component (@qawolf/webrtc-control) presents streams from three completely different server-side sources - Linux container X11, Android Cuttlefish VM, and ReplayKit on real iPhones - so all platforms look and feel identical to observers.
Delivering this required three technical solves and several trade-offs. Discovery uses signaling plus STUN/TURN (they run coturn on a dedicated VM with a wide UDP port range 49152-65535 because Kubernetes LBs don’t fit), and Android uses gRPC while desktop/iOS use WebSocket. At fleet scale encoding cost drove codec choice: VP8 was CPU-heavy so H.264 was adopted for efficiency, but headless consumers couldn’t decode it out-of-the-box - QA Wolf forked its WebRTC stack to compile in H.264 support so recorders, screenshot processors, and AI agents could decode streams. The result: reliable, low-latency live viewing and simultaneous durable recording across thousands of unattended runs.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.