AI Test Case Generation
Generate comprehensive test cases from natural language descriptions using AI.
AI Test Case Generation
The AI test case generation feature creates comprehensive, well-structured test cases from a natural language description of the feature or scenario you want to test. This is the fastest way to bootstrap a test suite for a new feature.
How to Generate Test Cases
- Navigate to the Test Cases tab in your project.
- Click the AI Generate button in the toolbar.
- Enter a description of the feature you want to test. Be as specific as possible.
For example:
- "User login with email and password, including validation for empty fields, invalid email format, incorrect password, account lockout after 5 failed attempts, and successful login redirect to dashboard"
- "Shopping cart that supports adding items, updating quantities, removing items, applying discount codes, and calculating tax based on shipping address"
- Optionally specify the number of test cases you want generated.
- Click Generate. The AI processes your description and produces test cases.
- Review the generated test cases in the preview. Each includes:
- A descriptive title
- Detailed test steps with numbered actions
- Expected results for each step
- Suggested priority and type
- Edit any test cases that need adjustment (modify titles, add/remove steps, change priority).
- Select the test cases you want to keep and click Save to add them to your project.
Always review AI-generated test cases before saving. While the AI produces high-quality output, it may miss domain-specific edge cases or business rules that only your team knows.
Generation Tips
The quality of AI-generated test cases depends heavily on the quality of your input description. Here are tips to get the best results:
Write Specific Descriptions
| Instead of... | Try... |
|---|---|
| Test the login page | Test user login with email/password including empty field validation, invalid credentials, account lockout, remember me, and forgot password link |
| Test the checkout | Test e-commerce checkout flow: guest vs logged-in, credit card and PayPal, address validation, order summary, email confirmation |
| Test user settings | Test user profile settings: update display name, change email with verification, upload avatar (JPEG/PNG, max 5MB), change password requiring current password, delete account with confirmation |
Include Boundary Conditions
Mention edge cases, error states, and boundary conditions in your description. The AI will generate test cases covering these scenarios:
- Input limits (min/max values, character limits, file sizes)
- Error handling (network failures, server errors, invalid data)
- Permission scenarios (unauthorized access, expired sessions)
- Concurrent operations (multiple users, race conditions)
Specify the Testing Focus
If you want the AI to focus on specific areas, mention them explicitly:
- "Focus on negative testing" — generates more error and invalid input scenarios
- "Focus on security testing" — generates XSS, injection, and auth bypass scenarios
- "Focus on accessibility" — generates keyboard navigation, screen reader, and ARIA scenarios
- "Focus on performance" — generates load, timeout, and concurrency scenarios
You can generate test cases in batches. Start with a high-level description for broad coverage, then run additional generations focused on specific areas (security, edge cases, etc.) to deepen coverage.