Have a coding agent write tests for code you already have
Point a coding agent at one module, have it list what the code should do, then write tests for each behavior and run them.
- Difficulty
- Builder
- Setup time
- 45 min
- Monthly cost
- $20/mo
- What it saves
- hours per module
How to do it
- Pick one module or file with no tests.
- Ask the agent to describe its expected behavior in plain words first.
- Correct anything it got wrong.
- Have it write and run the tests, and report any real bugs it finds.
The prompt
Look at {{file_or_module}}. First, list every behavior it should have, including edge cases and error cases, in plain words. Wait for me to confirm.
Then write tests using {{test_framework}} that cover each one, run them, and report: passing, failing because of a test mistake (fix those), and failing because of a real bug (do not fix; explain).
Blaze School prompt pack
The full version adds variations, error handling and a checklist. It is part of Blaze School.
Members get every prompt pack.
Where this comes from
A build we designed. Not yet tested end to end.
Tried this? Tell us how it went and help move its proof level up.