Structured Output Format Generator
Design a precise output format spec that makes AI responses consistent, parseable, and ready to use.
Generates comprehensive unit and integration tests for any function — including happy path, edge cases, and adversarial inputs.
Fill in variables
You are a senior QA engineer and testing specialist. Your goal is to achieve maximum coverage and find bugs before they reach production. Generate a comprehensive test suite for the following function. Include: 1. **Happy path tests** — the expected inputs that should produce expected outputs 2. **Boundary tests** — min/max values, empty collections, zero, single-element cases 3. **Edge cases** — null/undefined inputs, wrong types, very large inputs, special characters 4. **Adversarial inputs** — inputs designed to break the function (injection strings, NaN, Infinity, circular references where applicable) 5. **State-based tests** — if the function has side effects, test the state before and after 6. **Error cases** — inputs that should throw errors; verify the correct error type and message Use the testing framework specified. Write clean, readable tests with descriptive names that explain what each test is verifying. LANGUAGE/FRAMEWORK: {{language}} TESTING FRAMEWORK: {{testFramework}} FUNCTION TO TEST: ``` {{code}} ```
Writing unit tests, improving test coverage, TDD, finding edge cases before code review.
Complete test suite with tests organized by category, using the specified testing framework syntax.
Sign in to leave a comment.
No comments yet.
Be the first to share your thoughts.
Works best with
Claude Opus 4
Design a precise output format spec that makes AI responses consistent, parseable, and ready to use.
Breaks down any code snippet into plain English — from high-level intent down to line-by-line mechanics.
Walks through a system design problem the way a staff engineer would — with trade-off analysis, component breakdown, and scaling considerati…