Testing my game like it's production
SpireScape is the multiplayer card battler I'm building. This page reports on a pytest suite that plays it over the network, the same way the browser client does, against a seeded local build and the live public demo.
Claude drafted the tests and reviews every run. For now it runs with no human review, as an experiment: the review's suggestions stay open until I decide them, and the counter shows how many tests I've read myself. Everything below is generated from the run records, so it's only ever as good as the last run.
Watch the last run
A replay of the latest run, test by test, at the pace it really ran (sped up). Each lane is a pytest-xdist worker. Hover a bar for the test behind it.
What it covers
Every test carries a layer (how it tests) and an area (what it tests). The layers run from unit tests of the lab's own code to a real browser loading the WebGL client.
Tests by layer
Area by layer
How many tests hit each part of the game, and how. Darker means more.
Protocol coverage
Bugs it found
Real defects in SpireScape, each pinned by a strict xfail test. When one's fixed, its test starts passing, and that fails the run until I take the marker off. So a fix can't slip past unnoticed, and neither can a regression.
Trends
One point per recorded run.
Slowest tests on the live demo
Seconds per test at the real 600 ms tick, where a walk across the map takes a while.
Flaky tests
Tests that both passed and failed within the last 20 runs of the same target.
AI review
After the runs, Claude reads the run records and the test code and writes this. Before the page is built, every test it names and every number it quotes is checked against the records, and anything that doesn't match is struck out.
Suggestions, and what I decided
Claude proposes ways to improve the suite. I decide. Nothing changes until I've accepted it, and a rejection stays here with my reason.
AI evals: email triage
The other half of the lab tests something non-deterministic. My email dashboard sorts mail with rules first and Claude Haiku for the rest, and pulls interview times into a calendar. These evals score it against a labelled inbox of made-up emails.
How it's built
The server is C#. The suite never imports it: it speaks the wire protocol from Python, so it tests what a player can actually reach.
Speak the protocol
A Python codec for the server's binary format, checked byte for byte against hand-worked frames and round-tripped by Hypothesis.
Play, don't poke
Tests are written as player steps: talk, gather, craft, fight. Waits are budgeted in server ticks, so one suite runs at 20 ms locally and 600 ms live.
Run in parallel
pytest-xdist gives each worker its own seeded server locally. Live, the fights share one worker because the map has two rats.
Record everything
A small pytest plugin writes each run to JSON: outcome, timing, worker, layer, metrics, and which protocol messages were seen.
Review with AI
Claude summarises the runs and proposes changes. Its claims are checked against the records before they're shown.