Skip to main content
Learn how to write better prompts, get more accurate results, and use the AI Assistant effectively.

Writing Better Prompts

Be Specific

❌ “Create a test”✅ “Create a test for login with OAuth via Google on mobile”

Provide Context

❌ “Generate tests”✅ “Generate smoke tests for the checkout flow in our e-commerce app”

Include Requirements

❌ “Test the API”✅ “Test the POST /users API endpoint with valid and invalid email formats”

Specify Format

❌ “Create tests for signup”✅ “Create 3 separate tests for signup: happy path, invalid email, and weak password”

Iteration Techniques

1

Start Broad

Begin with a general request:
Create tests for user authentication
2

Review and Refine

Ask the AI to adjust:
Add steps for two-factor authentication
Include social login scenarios
Make the test data more specific
3

Expand or Split

Modify scope as needed:
Split this into separate tests for each auth method
Expand this to cover all error scenarios
4

Save Template

Once you’re happy with the format, use it as a reference:
Create more tests like TC-0042

Do’s and Don’ts

Provide examples of what you want
Mention your product type or industry
Specify test priorities and tags
Ask for explanations if unclear
Request test data to be included
Mention platform (web, mobile, API)
Reference user stories or requirements
Ask the AI to review existing tests

Advanced Techniques

Upload or paste requirements directly:
Generate tests from this user story:
[paste entire user story with acceptance criteria]
Upload API documentation:
Create API tests from these Swagger docs:
[attach or paste OpenAPI spec]
Use existing tests as templates:
Create tests similar to TC-0042 but for the signup flow
Update TC-0156 to include these new requirements: [paste requirements]
Get suggestions:
What edge cases should I test for file upload?
Review my checkout tests and suggest improvements
What tests am I missing for this feature?
Work with multiple tests:
Generate a complete test suite for user management including CRUD operations
Create tests for all error scenarios in the payment flow
Convert these manual tests to automated test scripts

Common Patterns

Pattern 1: Feature-Complete Testing

Generate a complete test suite for [feature] including:
- Happy path scenarios
- Error handling
- Edge cases
- Performance requirements
- Accessibility checks

Pattern 2: From User Stories

Create tests for this user story:

Title: As a [user type], I want to [action] so that [benefit]

Acceptance Criteria:
- [criterion 1]
- [criterion 2]
- [criterion 3]

Pattern 3: API Testing

Generate API tests for [endpoint] including:
- Valid request
- Invalid parameters
- Authentication failures
- Rate limiting
- Response validation

Pattern 4: Regression Suite

Create regression tests for [feature] covering:
- Previously reported bugs
- Recent changes
- Integration points
- Critical workflows

Quality Checklist

Before saving AI-generated tests, verify:
Title clearly describes what is being tested
Steps are specific and actionable
Expected results are measurable
Preconditions are listed
Test data is appropriate
Tags and priority are correct
Test is atomic (tests one thing)
No assumptions about system state

Troubleshooting

Try:
  • Rephrase your question
  • Provide more context
  • Give an example of what you want
  • Break complex requests into smaller parts
Try:
  • Include specific test data
  • Mention your product/industry
  • Reference existing tests as templates
  • Provide acceptance criteria or requirements
Try:
  • Show an example of your preferred format
  • Specify which fields to include
  • Ask for specific sections to be expanded
  • Request step-by-step refinements
Try:
What edge cases am I missing for [feature]?
Generate negative test scenarios for [feature]
What error conditions should I test?

Pro Tips

Save Good Prompts: When you craft a prompt that works well, save it for future use
Use Templates: Once you have a test format you like, ask the AI to create more tests using the same structure
Iterate in Conversation: Don’t try to get perfect results in one prompt—refine through conversation
Combine with OQL: Use the AI to help build complex OQL queries for advanced searches

What’s Next?