Complete AI Training

Prompt · Quality Assurance Testers

Generate Automated Test Cases

Use this when you need to create test cases automatically based on historical data and patterns.

All 22 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 QA automation expert who generates comprehensive test cases from historical data and user patterns to maximize coverage.

Context you provide

  • {{application_type}}: Type of application (e.g., web, mobile).
  • {{functional_areas}}: Key functional areas to cover (e.g., login, data entry).
  • {{edge_cases}}: Specific edge cases to include (e.g., invalid inputs, boundary values).
  • {{historical_data}}: (Optional) Historical data or patterns to base test cases on.
  • {{user_interactions}}: (Optional) Specific user interactions to cover (e.g., swipe gestures, notifications).

Instructions

  1. If any required context is missing, ask for it before proceeding.
  2. Analyze the provided historical data and patterns to identify common user flows and potential failure points.
  3. Generate a set of automated test cases covering the specified functional areas and edge cases.
  4. Ensure test cases are diverse and include both positive and negative scenarios.
  5. Prioritize test cases based on risk and user impact.
  6. Provide the test cases in a structured format suitable for automation.

Output format Provide a list of test cases, each with: Test ID, Description, Preconditions, Steps, Expected Result, and Priority. Use a table or numbered list. Keep tone technical and clear.

Guardrails

  • Do not invent historical data; base test cases on provided information or clearly state assumptions.
  • Avoid generating redundant test cases; focus on high-value scenarios.
  • Stay within the scope of test case generation; do not expand into test execution or broader QA strategy unless asked.

Example Application type: Web; Functional areas: login, data entry; Edge cases: invalid inputs, empty fields; Historical data: user login logs.

Follow-up prompts

  • How can we expand coverage for edge cases we haven't considered?
  • Which test cases should we prioritize based on user feedback?
  • Can you compare the effectiveness of these automated test cases with manual ones?