I build software with an AI agent, which raises an obvious question: who tests the software? Not me — I have a day job. So I built the thing that tests it by itself: an agent that learns my web application the way a curious human would, by clicking around, trying things, and remembering what happened. Then it reports bugs.
At a glance
- Target: my wargame web app (Django + SQLite) — the same Domain Maneuver project
- Brains: a local LLM (see Running AI at Home), no cloud APIs
- Memory: a persistent world model in SQLite that grows every night
- Proof: every mission is checked by a machine against the database — the agent can't grade its own homework
- Data on this page: rebuilt from the learner's live database · last learned 2026-10-25
The idea
Most automated testing is brittle: scripts that know where a button is, and break when the page changes. I wanted something that behaves like a new employee on their first day — it doesn't know where anything is, it explores, it notices when something breaks, and it gets better every day it works here. Concretely, each night the agent spawns two copies of my app in a sandbox, and plays episodes: it looks at the page, picks an action, acts, and observes what changed.
What makes the learning stick is the memory. Every page it visits becomes a state; every action that changes the page becomes an edge. After a few nights it has a map of the whole application — which pages exist, what each button does, which paths lead somewhere new. Exploration is steered by novelty: pages it has already mapped score zero, so its attention naturally drifts toward the parts of the app it doesn't know yet.
What it has learned so far
Live numbers
- 6852 distinct page states mapped
- 50345 action-to-effect edges learned
- 7054 interactive elements catalogued
- 2233 episodes played (1322 by the LLM policy)
- 107 lessons distilled into its playbook
- 644 bug events logged — three root causes so far, write-ups below
Separate from exploration, it gets missions with machine-checkable success conditions — for example “create a unit on the map” is verified by querying the database for the resulting row. An LLM that wants a reward will happily believe it succeeded; the postcondition check is what keeps it honest.
Mission scoreboard
| Task | Scripted policy | LLM policy | |
|---|---|---|---|
a | Stand up a unit and place it on the map | done (scripted + agent) | done (agent) |
b | Walk the full turn loop with the complete order of battle | done — full game: 3,575 units, six factions, 8 adjudicated moves, machine-scored | open |
c | Flip a hidden feature toggle | done (scripted) | open (digest fix pending) |
d | Create an article, then correct it | done (scripted + agent) | done (agent) |
e | Snapshot the game state | done (scripted + agent) | done (agent) |
From explorer to QA engineer
Exploring one app is table stakes. When version 2 ships, the agent will need to know what changed — not in the source history, in the interface. So it now keeps an affordance fingerprint of every page: every button, link, and form, independent of layout. Between builds it diffs the fingerprints. Against a pre-release copy of the next version it found “four new controls on this screen,” clicked each one, watched what changed pixel by pixel, and reported which ones do nothing, which ones crash, and what the new feature actually is.
The bugs come out of it with screenshots, console traces, and exact click-by-click repro steps — deduped and drafted as issue reports a reviewer can pick up and verify.
Bugs it found on its own
This is the part I didn't expect to work. Nobody told it what to look for — it just notices when reality disagrees with expectation:
- A blank map, ninety-six times. Every page that renders the tactical map produced a grid with no terrain. The agent logged the identical console error ninety-six times, and the report trace nailed the cause: the map images are routed by my web-server config, so pages served without it — development setups — ask the app server for tiles it doesn't serve. Production is fine; a fresh clone isn't.
- Developer pages in production clothing. Wrong URLs returned a debug page that helpfully lists the site's internal address structure. Development configuration on a public listener — exactly the kind of sloppy leftover a real attacker would try first, and exactly what a fuzzer finds. Fix is a one-line settings change, queued behind the review that owns it.
- One bad soldier grounded the whole map. The situation map showed zero unit markers — the same blank-grid bug from before, but with the full order of battle loaded, so this one was real. The trace: one unit in 3,575 was missing its icon image. The map library threw on it, nobody caught the exception, and the loop drawing every subsequent marker died on the spot. One bad row, every marker after it gone. The fix guards the loop; verification: 3,575 markers on the map where it was zero, screenshot attached, committed with the root cause.
What it taught me
- Verification beats enthusiasm. The model claimed success on tasks it failed (the scoreboard is honest because the database is not). Machine-checkable postconditions are the whole difference between a demo and a test suite.
- Seeing is a feature. The most interesting open failure isn't the model being dumb — it's that my page-summary format didn't tell the model whether a checkbox was checked. It cannot reason about state it cannot perceive.
- Small and consistent beats big and vague. Plain-language playbook lessons, injected into every episode prompt, took a task from failed to passed between two runs. No retraining needed yet.
What's next
- The hardest mission — walking the turn loop my game exists for — now closes end to end in the scripted policy with the full order of battle. Teaching that loop to the LLM policy is next: pages that exist but never surface in the links it follows are still the interesting failure mode.
- Next on the test list is version 2 of the game itself — the affordance diffing above was built for exactly that handoff.
- It runs nightly on my home server and keeps its own database; the numbers above are rebuilt from it. Coverage of the app's URL space keeps climbing.
Built October 2026. The app under test is my own; the agent runs only in sandboxes on my local network, and this page shows only what I chose to publish.