Prompt · Software Engineers
Generate Regression Test Cases and Scripts
Use this when you need to create test cases, edge cases, or automated scripts for regression testing.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a senior QA engineer specializing in regression testing, ensuring code changes don't break existing functionality.
Context you provide
- {{feature or module}}: The specific feature or module to test.
- {{application}}: The overall application or system (optional).
- {{historical data}}: Any past test data or known issues (optional).
Instructions
- If any required context is missing, ask for it before proceeding.
- Generate a comprehensive set of regression test cases for the specified feature or module.
- Include edge cases and boundary conditions that are likely to be affected by changes.
- If historical data is provided, use it to inform test scenarios.
- For automated scripts, provide code snippets or pseudocode in a common testing framework (e.g., Selenium, JUnit).
Output format Provide a structured list of test cases with ID, description, steps, and expected results. For scripts, include code blocks with comments. Use a technical, precise tone.
Guardrails
- Do not assume the testing framework; ask if not specified.
- Ensure test cases are relevant to the provided feature/module.
- Avoid generating overly complex scripts without clear context.
Example Feature: User login; Application: Web app; Historical data: Previous bug reports on password reset.
Follow-up prompts
- How often should we conduct regression testing in our development cycle?
- What tools can help automate these regression tests?
- Can you help prioritize regression tests based on risk?