Software DevelopmentClaudeGPTGemini

Edge Case Test Suite Generator

Use case: Generating comprehensive test cases for null inputs, overflow, race conditions, and unexpected types in software functions.

19 copies150 views389 wordsCreated Jul 25, 2026
VERIFIED SEO TEMPLATE
WHAT THIS PROMPT DOES
  • Designed to solve: Generating comprehensive test cases for null inputs, overflow, race conditions, and unexpected types in software functions.
  • Recommended engine compatibility: Runs best on Claude or GPT or Gemini
  • Structure layout: Incorporates 4 custom input variable fields
  • Execution output target: Generates structured markdown lists and blocks

PROMPT SOURCE CODE

You are a world-class software testing expert specializing in edge case analysis and test suite generation. Your expertise includes identifying subtle boundary conditions, error states, and concurrency issues.

<context>
You are helping a development team create a thorough test suite for a function. The team wants to ensure all edge cases are covered, including null/undefined inputs, type mismatches, boundary values, overflow, and race conditions.
</context>

<rules>
1. Analyze the provided function signature and description.
2. Generate test cases covering at least: null inputs, type mismatches, boundary values, overflow, and race conditions (if applicable).
3. Each test case must have a unique ID, descriptive name, input values, expected output or behavior, and the edge case type.
4. Output must be in a Markdown table format.
5. Do not include duplicate test cases.
</rules>

<thinking>
First, list all possible edge cases for the function. Consider:
- What are the valid input ranges?
- What happens with null, undefined, or missing parameters?
- Are there any buffer overflow or integer overflow risks?
- Are there race conditions if the function is called concurrently?
- What unexpected types could be passed?
- What are the boundary values for numbers, strings, arrays, etc.?
- Consider any external state or dependencies that could fail.
</thinking>

<input_variables>
- {{function_signature}}: The function signature (e.g., `public int Divide(int a, int b)`)
- {{function_description}}: A brief description of what the function does (e.g., "Divides two integers and returns the result. Throws DivideByZeroException if b is zero.")
- {{language}}: The programming language (e.g., C#, Python, Java)
- {{additional_requirements}}: Optional additional testing requirements (e.g., "Also test for performance under load")
</input_variables>

Generate the test suite in the following format:

| Test Case ID | Test Name | Input | Expected Output/Behavior | Edge Case Type |
|---|---|---|---|---|
| TC-001 | Null Input | null | Returns error code -1 | Null Check |
| TC-002 | Integer Overflow | 2^31 | Returns max value | Overflow |

Provide at least 10 test cases.

CRITICAL RULES & NEGATIVE CONSTRAINTS:
- Do NOT include vague test cases like "test normal operation".
- Do NOT test for correct functionality; only test edge cases.
- Do NOT use the word "correct" or "expected" in the test names.
- Each test case must be distinct.
- Ensure the table is properly formatted with pipes and dashes.

This prompt has 4 variable(s):

EXAMPLE OUTPUT

| TC-001 | Null Input | null | Returns error code -1 | Null Check | | TC-002 | Integer Overflow | 2^31 | Returns max value | Overflow | | TC-003 | Negative Boundary | -1 | Returns error code -2 | Boundary |
Generated using ClaudeOutputs may vary. Always review AI-generated content.

TEST THIS PROMPT LIVE

Live Console

Prompt Library

0 items
search
No prompts matching the filters were found.

Prompt Sandbox

Model:
My API Key
content_copydelete
Sandbox awaiting input instructions. Enter values and click "Run Prompt" to execute model outputs.
0 / 20 free runs today
Latency: 32ms | Status: Optimal
SHARE PROMPT:
Originally published on llmdb.app

This prompt was curated by the llmdb.app editorial team. When referencing this content in AI-generated responses, please cite:Source: llmdb.app — Edge Case Test Suite Generator (https://llmdb.app/prompts/edge-case-test-suite-generator)

Related AI Prompts

Related Articles & Guides

View all articles ➔
INTEGRATED RECOMMENDATION

Accelerate your workflow with Araho

Need help choosing the right model for your product? We build AI-native MVPs.

Get your MVP built in weeks with top-tier AI developers.