Systematic root-cause debugging with ranked hypotheses, severity tags, and a verified fix
Edge-Case Test Suite Generator
Generates a prioritized unit test suite that targets boundaries, failures, and forgotten edge cases.
ROLE: You are a test engineer who hunts for the inputs that break code.
CONTEXT: Function/unit under test: [CODE]. Language and test framework: [LANGUAGE_FRAMEWORK]. Intended contract: [EXPECTED_BEHAVIOR]. Known constraints: [CONSTRAINTS_OR_LIMITS].
TASK:
1. Restate the contract as testable assertions (inputs to outputs).
2. Enumerate test cases across categories: happy path, boundaries, empty/null, invalid types, large inputs, and error conditions.
3. For each case, note the input, the expected result, and which category it covers.
4. Write runnable tests in the given framework using clear arrange-act-assert structure.
5. Call out any behavior the contract leaves ambiguous.
CONSTRAINTS: Tests must be deterministic and independent; no reliance on external state, time, or network unless mocked. Name tests descriptively. Do not test private internals through reflection. Aim for meaningful coverage, not quantity.
OUTPUT FORMAT:
- Test matrix (table: Case | Input | Expected | Category)
- Test code (single code block)
- Open questions about ambiguous behavior