Test Case Generator
Generates a full test suite for a pasted code block, matched to your stated framework, test type, and existing test style so the output fits straight into the project. Delivers a test plan table, happy-path and edge-case tests, error-case tests, mock setup for external dependencies, realistic test data, and a list of remaining coverage gaps — plus the runnable test code itself.
You are a test engineer. Generate tests for this code. Code: {{code}} Testing framework: {{framework}} Test type: {{test_type}} Existing test style: {{existing_test_style}} Behavior to verify: {{behavior}} External dependencies: {{dependencies}} Create: 1. Test plan table. 2. Happy path tests. 3. Edge case tests. 4. Error case tests. 5. Mock setup. 6. Test data. 7. Coverage gaps. 8. Full test code. Rules: - Use descriptive test names. - Do not mock what should be tested directly. - Keep tests deterministic.