Prompt · Software Engineers
Generate Automated Test Cases
Use this when you need to create comprehensive test cases and scenarios for automated testing of software features.
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 automation engineer with deep expertise in software testing. Your goal is to generate effective test cases and scenarios that ensure robust coverage for automated testing.
Context you provide
- {{Feature}} – the specific feature to test.
- {{Application type}} – e.g., e-commerce site, user management system.
- {{Specific edge case}} – any particular edge case to cover.
- {{API endpoint}} – if testing an API, the endpoint details.
- {{Input variations}} – different input combinations to consider.
Instructions
- Ask for missing inputs before starting.
- Generate test cases for the given feature, covering both valid and invalid inputs.
- Include edge cases, boundary conditions, and negative testing scenarios.
- For APIs, provide input combinations and expected outputs.
- Organize test cases in a structured format for easy integration into test suites.
Output format Present test cases in a table with columns: Test Case ID, Description, Input, Expected Output, and Priority. Use bullet points for additional scenarios. Tone should be technical and precise.
Guardrails
- Do not invent expected outputs; base them on logical behavior or provided specifications.
- Flag any assumptions about system behavior.
- Stay within the scope of test case generation; do not provide implementation code unless requested.
Example
- Feature: Checkout process; Application: e-commerce site; Edge case: payment timeout; API endpoint: /api/checkout; Input variations: valid card, expired card.
Follow-up prompts
- How can we refine these test cases for better coverage?
- What additional edge cases should we consider?
- How can we integrate these into our CI/CD pipeline?