Customize this prompt (fill variables)
How to use this prompt
This Claude regression test plan prompt is for checking a proposed fix, not diagnosing an unknown bug. It asks for the rule that defines correct behavior, the observed failure, and the change boundary. The result should show which test reproduces the old failure, which nearby cases could regress, and which expectations cannot be set until the specification is clarified.
HOW TO USE
1. Provide the authoritative behavior rule separately from the bug report so the old behavior is not mistaken for the correct one.
2. Include the smallest change context needed to identify neighboring behavior. Remove credentials and real customer records.
3. Check the expected-result column against the specification before implementing tests.
4. Run the approved cases in the authorized test environment and replace “not executed” with actual evidence only after execution.
VARIABLE GUIDE
{{BUG_REPORT}} — Observed behavior and reproduction evidence for one bug; redact secrets and production identifiers.
{{EXPECTED_RULES}} — The rule or acceptance criterion defining correctness, including boundary and invalid-input policies.
{{CHANGE_CONTEXT}} — The patch summary or minimal relevant code, affected interfaces, and what should remain unchanged.
{{TEST_CONTEXT}} — Permitted test environment, synthetic fixtures, framework, isolation requirements, and time or scope limits.
WORKED EXAMPLE
Open the example section below for a fictional, author-written demonstration. No live AI-tool test or real customer result is claimed.
EXPECTED OUTPUT
A focused matrix with reproducible fixtures, rule-backed expected results, priorities, and honest execution labels. Missing business rules should remain questions, not implicit implementation decisions.
TIPS AND COMMON MISTAKES
• A regression case needs an assertion that would distinguish the reported failure from correct behavior.
• Keep an expected value independent of the implementation under test; do not calculate both with the same potentially faulty helper.
• Separate unavailable evidence from a failed test. “Not executed” and “failed” are different states.
LIMITATIONS AND REVIEW
Claude cannot establish passing tests or release readiness without execution evidence. Test adequacy depends on the supplied specification and change context; hidden dependencies may be missed. The example is fictional and the arithmetic was checked with decimal calculations, not by running a real checkout or a live Claude session.
RELATED RESOURCES ON PROMPTTAI.COM
The following page paths are on PromptTai.com.
Debugging Assistant — Use first if the failure or likely cause is still unclear.
/prompts/debugging-assistant
Code Documentation Generator — Document interfaces and invariants that test reviewers need.
/prompts/code-documentation-generator
Example: what to expect
Example input
Example output
Variables explained
| Variable | What to enter |
|---|---|
{{BUG_REPORT}} |
Observed behavior and reproduction evidence for one bug; redact secrets and production identifiers. |
{{EXPECTED_RULES}} |
The rule or acceptance criterion defining correctness, including boundary and invalid-input policies. |
{{CHANGE_CONTEXT}} |
The patch summary or minimal relevant code, affected interfaces, and what should remain unchanged. |
{{TEST_CONTEXT}} |
Permitted test environment, synthetic fixtures, framework, isolation requirements, and time or scope limits. |
Tips for better results
Best used for: Design a regression test matrix for a specific bug fix, including defensible expected results and neighboring behavior.
- Give the AI context first: who you are, who the audience is, and what “good” looks like for you.
- Ask for output in a specific format (bullets, table, markdown) when you need structure.
- If the result is close but not perfect, reply with “keep the structure, make it more…” — do not start over.
- For long tasks, split the prompt into steps instead of expecting one giant answer.
- Different tools behave differently — ChatGPT, Claude and Gemini each have their own style. Try this prompt on the tool you use most.
About Claude — tool notes
Anthropic Claude — long-context chat with strong writing and coding.
Claude responds well to XML-ish structure and explicit “do not” constraints. Keep instructions positive and specific.
How to use this Coding prompt effectively
What this prompt does
Turn a bug report and intended behavior into regression tests with explicit expected results. Separate planned checks from executed tests and flag missing specifications.
Getting the most out of it
- Copy the prompt and paste it into your AI tool of choice (Claude).
- Fill the variables in curly brackets with your own topic, audience and tone — the customize button above builds a ready version for you.
- Review the first draft for facts and style before using it. AI output is a starting point, not a final product.
- Iterate: tell the AI what to keep and what to change. Small corrections beat re-typing the whole prompt.
Common mistakes to avoid
- Leaving the {{variables}} unfilled — the AI then guesses your topic.
- Expecting one output to be perfect — plan for 2–3 rounds of refinement.
- Pasting confidential information into public AI tools.