Catch features that an update broke. Record a known-good playtest baseline (state checks, values, screenshots, errors) and compare every later version against it, plus logic unit tests and a regression checklist for things automation can't see. Accepting intended changes, keeping baselines in the repo, and what to cover. Use after any change to an existing game, before merging or publishing, af...
Download skill (.zip) Files on GitHubGame regression testing
A regression is something that used to work and doesn’t any more. Protect what works before changing anything.
1. Record a baseline (on a known-good version)
Write the steps once (same format as playwright-game-testing). Cover each state and the core action:
[
{"wait": 800}, {"shot": "title"},
{"expect": "__game.scenes.current === 'title'", "name": "starts on title"},
{"key": "Enter"}, {"expect": "__game.scenes.current === 'play'", "name": "reaches play"},
{"eval": "__game.config.player.speed", "name": "player speed"},
{"hold": "ArrowRight", "ms": 500}, {"eval": "Math.round(__game.scenes.stack.at(-1).player.x)", "name": "x after 0.5 s right"},
{"key": "Escape"}, {"expect": "__game.scenes.current === 'pause'", "name": "pauses"}, {"shot": "pause"}
]
python3 <skill>/scripts/regress.py record http://localhost:8000/ --steps tests/steps.json --dir tests/baseline
2. Check after every change
python3 <skill>/scripts/regress.py check http://localhost:8000/ --steps tests/steps.json --dir tests/baseline [--mask 0,0,300,60]
It fails on: an expect that no longer passes, an eval value that changed, new page errors, console errors or failed requests,
a screenshot that changed more than 1% (mask the score or timer), or a screen that stopped animating.
To see what changed in a screenshot, use game-visual-regression (visual-diff.py).
Make runs repeatable: seed randomness (?seed=1), and evaluate positions after fixed holds. Avoid checking values that
depend on real time.
3. Intended changes
If the change was on purpose (new speed, new title art), re-run record and commit the new baseline in the same commit as
the change, with the reason in the message. Never re-record to make a failure go away without understanding it.
4. Logic tests (fast)
Pure rules (scoring, damage, loot, save migration, level parsing) get node tests that run in milliseconds. See playwright-game-testing. Add a test for every bug you fix, so it can’t come back.
5. What automation can’t see: manual regression list
Keep in docs/HANDOFF.md or tests/MANUAL.md, and play through after big changes: feel of the controls, sound, difficulty of
level 1, touch controls on a phone, WebGL scenes (viewer preview), and the full win path.
Report
“Regression check: 12 checks and 4 screenshots match the baseline; one intended change (player speed 260 → 280) re-recorded.”