AI Portfolio Lab Tools Games Blog Feedback
All Posts

Nobody Loses Their Word in a Test Runner

I had twenty-nine automated tests for Impostr. None of them could model a player who tapped past their word reveal before reading it.

2 min read
gamestestinguxweb-development

I made twenty-six automated tests to cover most scenarios for my Impostr game. Playwright suite, all passing. Concurrent state, timer stacking, the rejoin case where a player’s phone locks mid-round, the host-as-imposter flow where the guess prompt never showed up. The test file was longer than most features I’ve shipped.

Then I played an actual round with my family. Two things happened. People would forget the secret word as side conversations were happening while we waiting for a player to come up with their word. People would tap “Got it” before they actually saw and committed the secret word to memory.

That’s not a race condition. There’s no async mismatch to catch. The button works. The transition works. The player just moved past the reveal before reading it, and now they’re on the next screen with no idea what the secret word is or if they are the imposter.

Prevention came first. The “Got it” and “I’m ready” buttons are now locked for 1.2 seconds after the word reveals. The label changes to “Take a good look” during that window. Not a popup, not a modal, just a quiet hold before the button activates. Nobody who read the word notices the wait. The person about to tap through does.

Recovery turned out to need three separate paths. In offline pass-the-phone mode, a “Someone forgot their word?” button on the clue screen lets the host pick the player, hand the phone over privately, they peek, and the game continues. In online mode for regular players, a “Forgot your word?” toggle reveals the word inline without changing the screen or disrupting anyone else. In online mode for the host, “Peek at my word” skips the player picker and surfaces the word directly.

Then I wrote specs for all three. Twenty-nine tests now.

The thing about party games is that the players are the runtime. You can mock every async operation, cover every state transition, get the whole Playwright suite green. None of that models a person who was excited and tapped too fast. That failure doesn’t surface in a test runner. It surfaces around the dinner table at 11 PM when the game stalls and nobody wants to admit they missed the word.

Build the tap recovery before the first person asks for it. The accidental tap will happen. Heck, it happened to me.