Testing real-time multiplayer is painful. You need multiple concurrent players to reproduce race conditions, sync bugs, turn-order issues. So I asked an AI to solve that problem itself.
It came up with a setup where 3 Android emulators run simultaneously, each with a different role — host, guest1, guest2. A single script launches the same integration test on all three in parallel. They play through a full game together, orchestrated via a Supabase sync table (reusing the existing stack — no extra infra).
The interesting part: integration tests can't really "see" the UI. So it added automatic screenshot capture from all 3 emulators every few seconds, an HTML report with a side-by-side timeline, and LLM-based analysis of the screenshots to verify the game state at each step — since the AI running the test can't observe the screen directly.
Manual testing would catch more edge cases — but playing 3 players simultaneously is painfully slow. This automates 90% of it.
Video of the setup in action: https://streamable.com/ennjiy
Has anyone built something similar? Curious if there are better approaches — always looking to improve this.
PS : I posted this a few days ago but got moderated for an unknown reason, sorry if you already saw / commented
The user describes a setup for testing real-time multiplayer games using Flutter and Supabase. It involves running three Android emulators with different roles to automate testing, using AI for visual verification. The user seeks feedback on this approach and is open to improvements.
Websockets and STUN would have worked better than a full on db