Documentation Index
Fetch the complete documentation index at: https://mndesigns.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
API Testing Prompts
This section provides prompts designed to help you create effective API test scenarios using AI. These prompts ensure thorough testing of API endpoints, functionality, and integration.
Basic API Test Generation
Prompt Template
Generate API test scenarios for:
[API Service]: [Brief description]
API Details:
- Base URL: [URL]
- Authentication: [Type]
- Format: [JSON/XML]
- Version: [Version]
Endpoints:
1. [Endpoint 1]
2. [Endpoint 2]
...
Please include:
- Test Cases
- Request/Response Format
- Authentication
- Error Handling
- Validation Rules
Example Usage
Generate API test scenarios for:
User Management API: RESTful API for user operations
API Details:
- Base URL: https://api.example.com/v1
- Authentication: Bearer Token
- Format: JSON
- Version: 1.0
Endpoints:
1. POST /users
2. GET /users/{id}
3. PUT /users/{id}
4. DELETE /users/{id}
5. GET /users/search
Please include:
- Test Cases
- Request/Response Format
- Authentication
- Error Handling
- Validation Rules
Advanced API Testing
Integration Testing
Generate API integration test scenarios for:
[System/Service]: [Description]
Integration Points:
1. Authentication Service
2. Database Service
3. External APIs
4. Message Queue
5. Cache Service
Include:
- Test Cases
- Data Flow
- Error Scenarios
- Performance Impact
- Recovery Procedures
Generate API performance test scenarios for:
[API Service]: [Description]
Performance Metrics:
1. Response Time
2. Throughput
3. Concurrent Users
4. Resource Usage
5. Error Rates
Include:
- Test Scenarios
- Load Patterns
- Monitoring Points
- Success Criteria
- Failure Thresholds
Best Practices
When using these prompts:
-
Follow API Standards
- REST principles
- HTTP methods
- Status codes
- Error handling
-
Validate Responses
- Status codes
- Response format
- Data validation
- Error messages
-
Test Edge Cases
- Invalid inputs
- Boundary values
- Error conditions
- Timeout scenarios
-
Document API
- Endpoints
- Parameters
- Responses
- Error codes
Tips for Better Results
-
Start with Documentation
- API specs
- Endpoint details
- Authentication
- Data models
-
Plan Test Approach
- Test scope
- Test methods
- Tools selection
- Environment setup
-
Execute Tests
- Follow sequence
- Document results
- Validate responses
- Handle errors
-
Analyze Results
- Performance metrics
- Error patterns
- Response times
- Resource usage
Common Pitfalls to Avoid
-
Incomplete Coverage
- ❌ “Test the API”
- ✅ “Test all endpoints with valid/invalid inputs, authentication, and error scenarios”
-
Missing Validation
- ❌ “Check response”
- ✅ “Validate response status, format, data types, and business rules”
-
Poor Error Handling
- ❌ “Handle errors”
- ✅ “Test error scenarios with proper status codes, error messages, and recovery”
-
Inadequate Documentation
- ❌ “API tests”
- ✅ “Documented API tests with request/response examples, validation rules, and error handling”
Example Output Structure
API Test Plan: User Management API
Version: 1.0
Date: [Current Date]
1. API Overview
- Base URL
- Authentication
- Format
- Version
2. Test Cases
- Create User
- Get User
- Update User
- Delete User
- Search Users
3. Request/Response
- Request Format
- Response Format
- Status Codes
- Error Messages
4. Authentication
- Token Management
- Authorization
- Error Handling
- Security
5. Validation
- Input Validation
- Response Validation
- Business Rules
- Data Types
6. Performance
- Response Time
- Throughput
- Concurrent Users
- Resource Usage