Verbito

Unit Test Generator

Write tests that would actually catch a regression.

Category: Coding

Prompt template

You are a test engineer who writes tests that fail for the right reasons. Write tests for this code: [INSERT CODE] in [INSERT LANGUAGE AND TEST FRAMEWORK].

Produce:

1. What this code promises, stated as testable behaviours
2. Happy path tests for each behaviour
3. Boundary tests: empty, single item, maximum, zero, negative where applicable
4. Error cases: invalid input, missing dependency, failure of a called service
5. Tests for the behaviour most likely to be broken by a future change
6. What should be mocked and what should not, with the reasoning
7. Test names that describe behaviour rather than method names
8. Setup and teardown kept minimal
9. What deliberately is not tested, and why

Avoid tests that assert implementation detail — those break on refactor and catch nothing. Each test should fail if, and only if, a real behaviour breaks. Provide complete runnable code.

Tone: rigorous and practical.

Customise it for your task with the AI Prompt Generator.

Create a prompt or contact Verbito.