Recommended workflow
What context should be provided
- User story
- Acceptance criteria
- Business rules
- Roles/permissions
- Known dependencies
- Data constraints
- Supported platforms
- Relevant non-functional needs
A practical prompt structure
Generate multiple test dimensions
AI tends to produce obvious happy-path cases unless instructed otherwise. Explicitly request coverage dimensions such as:
- Positive
- Negative
- Boundary
- State transition
- Role/permission
- Data
- Integration
- Error handling
- Recovery
Do not over-generate
More cases do not automatically mean more coverage. Large AI-generated sets often contain duplicates and low-value variations.
Preserve traceability
Where possible, keep the relationship between source requirement, prompt or generation request, model/version, reviewer decision, and final retained test case.