Note: From the below post, "Prompt Template" and "Example Usage" are for you to copy/modify/reuse. The remaining fields are added for you to gain more knowledge about the Prompt. Happy learning!
Purpose
Any Functionality | Generate test cases tailored to detailed contextual requirements | Test Case Generation | Contextual Prompt
QE Category
Test Case Generation
Prompt Type
Contextual
Typical SUTs and Quality Phases
Best suited for test case design in complex scenarios with detailed requirements, such as integration testing or business-critical workflows.
Prompt Template
Role: A QA engineer designing test cases for [Feature Description] based on the detailed context and constraints provided below.
Context:
- **User Story**: [Insert User Story]
- **Acceptance Criteria**: [List Criteria]
- **Dependencies**: [List of System Dependencies or Interactions]
- **Constraints**: [Known Constraints, Risks, or Edge Cases]
- **Priority**: High/Medium/LowTask:
1. Generate 5-7 formal test cases tailored to the provided context.
2. Ensure each test case includes:
- Preconditions
- Test Steps
- Expected Results
3. Address all dependencies and constraints in at least two test cases.
4. Include at least one edge case and one negative scenario.
Example Usage
Role: A QA engineer designing test cases for a payment reconciliation workflow in a SaaS billing platform based on the detailed context below.
Context:
- **User Story**: As a finance manager, I want the system to reconcile payments daily, ensuring no mismatches between invoices and transactions.
- **Acceptance Criteria**:
- All invoices must be matched with corresponding transactions.
- Mismatched entries should be flagged for review.
- Reconciliation must complete within 30 minutes for up to 10,000 entries.
- **Dependencies**:
- Integration with payment gateways (e.g., Stripe, PayPal).
- Access to invoice and transaction databases.
- **Constraints**:
- Network outages may cause delays.
- High transaction volumes during peak hours.
- **Priority**: HighTask:
1. Generate 5-7 formal test cases tailored to the provided context.
2. Ensure each test case includes:
- Preconditions
- Test Steps
- Expected Results
3. Address all dependencies and constraints in at least two test cases.
4. Include at least one edge case and one negative scenario.Output Example:
1. **Test Case ID**: TC-001
- **Title**: Validate successful reconciliation for matching invoices and transactions.
- **Preconditions**: All required data is available in the databases.
- **Steps**:
1. Run the reconciliation process for a dataset of 1,000 entries.
2. Verify that all matching entries are reconciled.
- **Expected Results**: Reconciliation completes successfully with no mismatches.2. **Test Case ID**: TC-002
- **Title**: Validate handling of mismatched entries during reconciliation.
- **Preconditions**: At least 5 mismatched entries are included in the dataset.
- **Steps**:
1. Run the reconciliation process for the dataset.
2. Verify that mismatched entries are flagged for review.
- **Expected Results**: Mismatched entries are flagged, and no errors are encountered during reconciliation.
Tested in GenAI Tools
Extensively optimized for ChatGPT, Claude, Microsoft Copilot, Google Gemini, and Perplexity-- delivering reliable and actionable results across leading GenAI platforms.
Value of the Prompt
This prompt ensures highly contextual and relevant test cases by incorporating detailed dependencies and constraints.
Hands-On Exercise
Design test cases for an order fulfillment system. Include dependencies like inventory management and constraints like peak order volumes to generate relevant test cases.
Want More?
Challenge the prompt by introducing new dependencies or constraints mid-process. Observe how the tool adapts to generate deeper test cases.
Author
Ashwin Palaparthi
© 2023 Ai4Testers.com™ All rights reserved | Made with ❤️ by ContentShastra.com™
Check your inbox to confirm your subscription to Ai4Testers™. In the coming days, you will receive the FREE E-Book, GenAI for Software Testers – An Intro by Ashwin Palaparthi, along with ongoing GenAI knowledge assets.