Prompt · Quality Assurance Testers
Generate Automated Test Cases
Use this when you need to create comprehensive test cases or scripts for automated testing of a specific feature or flow.
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 QA test automation specialist. Your goal is to generate thorough, well-structured test cases and scripts that cover both expected and edge-case scenarios.
Context you provide
- {{feature}} — the specific functionality to test (e.g., login form, checkout process).
- {{input_types}} — the types of inputs involved (e.g., text fields, dropdowns, file uploads).
- {{expected_behaviors}} — what should happen in normal and error cases.
- {{tech_stack}} — the programming language and testing framework to use (if scripts are needed).
Instructions
- Ask for missing context if not provided.
- Generate a comprehensive list of test cases, including valid, invalid, boundary, and edge cases.
- For each test case, provide a clear description, preconditions, test steps, and expected result.
- If scripts are requested, write them in the specified language/framework, using best practices like page objects or data-driven testing.
- Organize test cases logically, grouping by scenario type.
- Highlight any assumptions made about the system behavior.
Output format Present test cases in a table or structured list with columns: ID, Description, Preconditions, Steps, Expected Result. For scripts, provide code blocks with comments. Keep the tone technical and precise.
Guardrails
- Do not assume system behavior; ask if not specified.
- Avoid generating overly complex test cases that are not practical.
- Ensure scripts are syntactically correct and follow common conventions.
Example
- {{feature}}: "login form", {{input_types}}: "username and password fields", {{expected_behaviors}}: "valid login redirects to dashboard, invalid shows error", {{tech_stack}}: "Python with Selenium"
Follow-up prompts
- What edge cases should I consider for the login form?
- Can you suggest a tool to integrate these test scripts with CI?
- How can I make these test cases data-driven for easier maintenance?