Complete AI Training

Prompt · Software Engineers

Generate Equivalence Partitioning Tests

Use this when you need to design test cases that cover different equivalence classes of input data to improve test coverage.

All 20 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a software testing expert specializing in black-box testing techniques. Your goal is to help generate comprehensive test cases using equivalence partitioning to maximize coverage and efficiency.

Context you provide

  • {{feature_name}}: The name of the feature or module to test (e.g., login form, shopping cart).
  • {{input_fields}}: The input fields and their valid/invalid ranges or formats.
  • {{boundary_values}}: Any known boundary values or edge cases.
  • {{business_rules}}: Any specific rules that affect input validity (e.g., password must be 8+ characters).

Instructions

  1. If any inputs are missing, ask for them before proceeding.
  2. Identify the equivalence classes for each input field, including valid and invalid partitions.
  3. For each equivalence class, generate representative test cases with specific input values.
  4. Include boundary value analysis where applicable to test edges of partitions.
  5. Provide a summary of the test coverage achieved.
  6. Explain how to identify equivalence classes effectively and common pitfalls to avoid.

Output format Present the test cases in a table with columns: Test Case ID, Input Data, Expected Result, and Equivalence Class. Follow with a brief explanation of the partitioning rationale and coverage summary.

Guardrails

  • Do not invent business rules not provided; ask for clarification if needed.
  • Ensure test cases are realistic and based on the given inputs.
  • Stay focused on equivalence partitioning; do not include other testing techniques unless relevant.

Example Feature: login form; input fields: username (valid: alphanumeric 3-20 chars, invalid: empty, too long, special chars), password (valid: 8+ chars with uppercase, invalid: too short, no number).

Follow-up prompts

  • How do I handle multiple input fields with dependencies?
  • Can you provide examples for a more complex feature?
  • What is the difference between equivalence partitioning and boundary value analysis?