

Claude Generates Software Test Cases from Requirements in 15 Minutes
You just finished a feature, or had AI build one for you, but you are not sure what to actually test. This guide shows you how to use Claude to turn a requirements description, even a few sentences, into a full set of test cases: happy paths, edge cases, and error cases. It takes about 15 minutes and you do not need to know how to code.
What you need
- A Claude.ai account (the free plan works fine).
- A requirements description for the feature you want to test: a few sentences you wrote yourself, a section from your project docs, or the description you already gave AI to build the feature.
- If you have it, paste or upload the related code too, so Claude can test against what actually exists. Not required.
Step by step
Step 1: Make the requirement clear first
Before asking for test cases, make sure the requirement is clear: what the feature does, who uses it, and the expected input and output. If it is still vague, ask Claude to clarify first:
Here is the requirements description for my [feature name] feature:
[paste your requirements description]
Read it and list anything still unclear, anything about input, output, or
conditions, that you need me to answer before writing test cases.
Answer the questions Claude raises before moving to step 2. This keeps Claude from guessing your intent.
Step 2: Ask Claude to generate test cases in 3 groups
Paste the prompt below, replacing the requirements section with your clarified version:
You are an experienced QA engineer. Based on the requirements description
below, write a complete set of test cases.
Requirements:
[paste your clarified requirements]
Split the test cases into 3 groups:
1. Happy path: the user does everything correctly, the result is as expected.
2. Edge cases: empty values, maximum and minimum values, large quantities,
unusual formats.
3. Error cases: wrong input, missing permissions, lost connection, invalid
data.
For each test case, write: a short name, the steps, the input data, and the
expected result. Present it as a table or numbered list.
Step 3: Review the test cases
Read through what Claude returns and ask yourself: did it miss anything from the original requirement? Did it add cases unrelated to this feature (AI sometimes pads with generic ones)? If something is missing, ask for more:
Add a test case for [describe the situation you thought of, e.g. two users
acting at the same time, or losing connection mid-way].
Step 4: Ask Claude to check against your code, if you have it
If you pasted or uploaded the feature's code, ask:
Based on the code I gave you, which of the test cases above is most likely to
FAIL? Explain why in plain words, you do not need to fix the code, just point
out the risk.
Claude reads the code and flags the suspicious spots (for example, no check for empty input, or no handling when an API call fails). This is where you learn what to manually check first before trying the feature yourself.
Example result
For the requirement "let users reset their password by email", Claude returns around 12 to 15 test cases, for example:
- Happy path: valid email that exists in the system, confirmation code received, new password set successfully.
- Edge cases: email in all caps, email with a leading space, new password exactly at the maximum allowed length.
- Error cases: email that does not exist in the system, expired confirmation code, new password same as the old one, requesting the code too many times in a short period.
Each test case comes with steps and the expected result, so you can copy it straight into a spreadsheet (Google Sheets, Notion, or Jira) and start testing by hand.
Tips for better results
- The more real details you include (field length limits, data formats, business rules), the more realistic the test cases Claude generates.
- If the feature has multiple user roles (guest, admin...), ask Claude to split test cases by role.
- Once you have a solid test case set for one type of feature, save it as a template, next time you only need to change a few details instead of starting over.
- If the feature runs on the web and you want to automate re-running these test cases every time you change the code, read next: Claude Code with Playwright MCP for automated E2E testing.
Limits to know
- Claude generates test cases based on what you describe, it does not actually know your whole real system, so someone who understands the business logic still needs to review the result.
- For features involving money, security, or personal user data, AI-suggested test cases are only a starting point, have an experienced tester review them too.
- Claude cannot run these test cases against your real system by itself (unless you add a tool like Playwright MCP), it only helps you think of and write down the cases to check.
FAQ
I do not know how to code, can I still use this? Yes. You only need to describe the feature in words, no need to understand the code. This is also how many vibe coders check the AI-built product themselves.
Should I use Claude or ChatGPT for this? Both work. Claude tends to present longer, well-structured lists, which helps when you need many detailed test cases in one go.
Can AI-generated test cases replace a human tester? Not entirely. It helps you avoid missing obvious cases and saves time writing them by hand, but a human tester still needs to judge business risk and real user experience.
Where should I save this test case list? A simple spreadsheet (Google Sheets) is enough for a small project: one row per test case, with columns for name, steps, expected result, and actual result.
Do I need to rewrite the test cases every time I change the code? No, not the whole set. Just ask Claude to review the part of the requirement that changed and add or update the related test cases, keeping the rest as is.
More articles

Use AI to Build a Fun Quiz Game That Draws Customers to Your Facebook Page in 20 Minutes

Use Claude to Build a Job Handover Checklist Before You Leave or Switch Roles

Claude Found a Theoretical Crack in the Encryption That Protects the Internet

What Are Emergent Abilities in AI? When a Model Suddenly Learns a Skill No One Taught It

What Is Max Tokens? How It Differs From the Context Window

Turn a Messy To-Do List into a Clear Checklist with ChatGPT in 5 Minutes