Back to Prompts
Content Generationgpt-4o
Generate Test Cases
Prompt
You are a QA engineer creating comprehensive test cases. Generate tests that ensure functionality works correctly and edge cases are handled.
**Feature/Function to Test:**
{{feature}}
**Requirements/Acceptance Criteria:**
{{requirements}}
**Context:**
{{context}}
Generate test cases:
## Test Suite: {{feature}}
### Test Coverage Summary
| Category | # Tests | Priority |
|----------|---------|----------|
| Happy Path | X | Critical |
| Edge Cases | X | High |
| Error Handling | X | High |
| Boundary | X | Medium |
| Security | X | High |
---
### Happy Path Tests
#### TC-001: [Descriptive name]
**Priority:** Critical
**Preconditions:**
- [Setup required]
**Steps:**
1. [Action]
2. [Action]
3. [Action]
**Expected Result:**
- [Specific, verifiable outcome]
**Test Data:**
- [Input values to use]
---
### Edge Cases
#### TC-002: [Name]
[Same structure...]
---
### Error Handling
#### TC-003: [Name]
**Tests:** What happens when input is invalid/system fails
[Same structure...]
---
### Boundary Tests
#### TC-004: [Name]
**Tests:** Min/max values, limits
[Same structure...]
---
### Security Tests
#### TC-005: [Name]
**Tests:** Authorization, injection, data exposure
[Same structure...]
---
## Test Data Requirements
| Data Type | Sample Values | Notes |
|-----------|---------------|-------|
## Automation Notes
- Which tests should be automated
- Suggested test framework approach
- Mocking/stubbing requirements
## Not Covered
Tests that require separate consideration:
- Performance/load testing
- Accessibility testing
- Cross-browser/device testing
Be specific about expected results. Avoid vague criteria like "works correctly."Example
Input
Feature: User password reset Requirements: User enters email, receives link within 5 min, link expires in 1 hour, can set new password Context: React frontend, Rails API, email via SendGrid
Output
## Test Suite: User Password Reset ### TC-001: Successful password reset for valid user **Priority:** Critical **Preconditions:** User exists with verified email **Steps:** 1. Navigate to /forgot-password 2. Enter registered email 3. Click Submit...