Home/Blog/ChatGPT Prompt for Test Cases: 10 Prompts for QA Teams
Blog

ChatGPT Prompt for Test Cases: 10 Prompts for QA Teams

P
promptstudio

A ChatGPT prompt for test cases plus 9 more: boundary values, negative cases, permissions, Gherkin scenarios, API tests, regression picks, and requirement gaps.

ChatGPT Prompt for Test Cases: 10 Prompts for QA Teams

A strong ChatGPT prompt for test cases gives the model the user story, numbered acceptance criteria, and the business rules, then asks for cases that trace back to each criterion. Paste vague requirements and you get vague tests that say "works correctly". Below is a full test case prompt plus 9 smaller prompts for boundaries, negative paths, permissions, Gherkin, API checks, and regression planning.

Fill in the [brackets] with your real requirements. Treat the output as a draft for your QA review, not a finished suite, and add the cases only after your team agrees on expected results.

The full test case prompt

1. User story to test cases

Act as a senior QA engineer. From this user story: [story], these acceptance criteria: [numbered criteria], and these rules: [rules], write test cases with ID, title, linked criterion, preconditions, steps, data, expected result, priority, and type. List requirement gaps first.

Prompts for test design techniques

2. Boundary values

For these fields and limits: [fields and rules], list valid and invalid equivalence classes and the exact boundary values to test for each.

3. Negative cases

List the ways a user could misuse or break this feature: [feature description]. Write one negative test per item with the expected error behavior.

4. State transitions

This object moves through these states: [states and events]. Build a state transition table and one test per valid and invalid transition.

5. Permission matrix

Roles: [roles]. Actions: [actions]. Build a role by action matrix and write a test for every action a role must not be able to perform.

Prompts for formats and tools

6. Gherkin scenarios

Convert these test cases into Gherkin: [cases]. Use a Scenario Outline with an Examples table wherever only the data changes.

7. API test cases

Here is the endpoint spec: [method, path, request fields, responses]. Write test cases for valid requests, missing fields, wrong types, auth failures, and each documented error code.

8. Import ready format

Reformat these cases as CSV with these columns for my test management tool: [columns]. Keep one row per step if [tool rule].

Prompts for planning and review

9. Regression picks for a release

This release changes: [change list]. From this suite: [case titles], pick the regression cases to run, ordered by risk, and explain each pick in one line.

10. Review my test cases

Review these cases against the acceptance criteria: [criteria and cases]. List uncovered criteria, duplicate cases, and expected results that are not observable.

Get the full test case generator

The Test Case Generator: User Story to Edge Cases and Gherkin prompt runs the first six prompts together. You give it the user story, acceptance criteria, business rules, roles, environments, and your case format. It returns requirement gaps, traced conditions, partitions and boundaries, a full case table, permission cases, Gherkin for P1 cases, and a coverage summary. The example on the page covers a checkout promo code with length, minimum order, and expiry rules.

Tips for AI written test cases

  • Number your acceptance criteria so every case can point back to one.
  • Ask for gaps first. Unclear requirements are cheaper to fix before anyone writes tests.
  • Check expected results against the product, not the model's assumptions.
  • Keep generated test data fake, never real customer records.
  • Run the P1 cases on every platform in scope. A checkout that passes on desktop can still fail inside a mobile app.

Related prompts

Moving from cases to code? Use the Automated Unit Test Generator for unit tests, the Playwright e2e Scaffold From a User Journey for browser tests, and pytest Fixture Design From a Test Plan for Python suites. Find more in the Coding prompts hub, browse more prompts, or share a prompt your QA team uses.