Feature Description
- This prompt generates a comprehensive suite of automated test cases (unit, integration, and regression tests) for a game that is being developed. Its goal is to ensure that while you iteratively add or modify features, existing mechanics and core functionalities are never silently broken. The tests act as a safety net, keeping the game’s behaviour constant and verifiable across every coding session.
Shared Context
- If there is any context or system prompt required before running the feature implementation prompt below, write it here.
- Agent Instructions: This can be done by going through the Agent tab and pasting this instructions.
You are an expert game developer and QA engineer automated test cases that prevent regressions. You have full knowledge of the game’s design document and existing codebase. When generating tests, follow these rules:
- Use the project’s test framework.
- Write tests that cover all core mechanics: movement, combat, scoring, UI state, save/load, physics interactions, and any unique game systems.
- Include both happy-path tests and edge-case/failure scenarios.
- Ensure tests are self-contained and mock external dependencies where necessary.
- Provide clear comments explaining what each test verifies.
Produce a ready-to-run test file.
Prompt
| Item |
Details |
| Name |
Automated Regression Test Generator |
| Description |
Generates a full set of automated tests that lock down existing game mechanics and UI behaviour, so future vibe-coded changes do not introduce regressions. |
I am actively developing a game through vibe coding, and I need you to create a thorough set of automated test cases that ensure all currently working mechanics and functionalities remain intact, no matter what new features I add later.
Read the entire codebase to understand the project.
Based on the above, generate a ready-to-run test file (or multiple files) that:
1. **Covers every core mechanic** – player movement, jumping, shooting, interactions, health, game over conditions, level transitions, UI updates, persistence, etc.
2. **Tests both normal operation and edge cases** – e.g., moving into walls, dying at the same time as defeating an enemy, rapid input spam, empty save files.
3. **Verifies that game state is consistent** – e.g., after completing a level, the score is correct, the next scene loads, and saved data matches.
4. **Includes integration tests** – e.g., a full “player takes damage, health bar updates, dies, and respawns” sequence.
5. **Is clearly organised and commented** – group tests by system, explain what each test validates, and note any assumptions.
6. **Runs independently** – mock time, input, and RNG where needed, so tests are deterministic and don’t rely on frame-perfect timing.
Output the complete test script(s) with nothing else. Use the same programming language and test framework that the game code uses.
Follow-up Tuning Prompt
- After you’ve run the generated tests and some fail due to later vibe-coded changes, use this prompt to automatically fix the tests (or the code) without breaking other functionality.
| Item |
Details |
| Name |
Regression Test Repair & Feature Update |
| Description |
Given a list of failed tests and the recently changed code, automatically update either the test expectations or the game logic so that all passing tests remain green and the game’s intended behaviour is preserved. |
Several of my automated regression tests are now failing after a new feature. I need you to analyze the failures and propose a fix that either updates the tests to match the new correct behaviour or corrects the game code if it broke a previously working mechanic.
For each failure:
1. Determine whether the test expectation is outdated or the game code is buggy.
2. If the test expectation is outdated, rewrite the test so it verifies the new intended behaviour, without weakening coverage.
3. If the game code is buggy, provide a corrected version that keeps the new feature working and restores the old behaviour.
4. Ensure that all previously passing tests continue to pass after the fix.
Output the updated test file(s) and, if needed, the corrected game code snippets. Include a brief explanation of each change.