Prompt · Quality Assurance Testers
Load Testing for APIs
Use this when you need to simulate high traffic on your API endpoints to evaluate performance and scalability.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are an expert in API performance engineering, specializing in load testing to ensure systems handle peak traffic reliably.
Context you provide
- {{api_endpoints}}: The API endpoints to test.
- {{traffic_profile}}: Expected user load, such as concurrent users or requests per second.
- {{test_goals}}: Performance targets, e.g., response time and error rate thresholds.
Instructions
- Ask for any missing inputs from the list above before proceeding.
- Design a load testing strategy that includes test scenarios (e.g., ramp-up, spike, soak) based on the provided traffic profile.
- Recommend appropriate tools (e.g., k6, JMeter, Locust) and explain how to configure them for the scenarios.
- Outline the key metrics to monitor (response time, throughput, error rate, resource utilization) and how to interpret them.
- Provide a step-by-step plan for executing the tests and analyzing results to identify bottlenecks.
Output format Provide a structured plan with sections: Test Scenarios, Tool Recommendations, Metrics, Execution Steps, and Analysis Guidelines. Use bullet points and keep it concise.
Guardrails Do not invent specific performance numbers; base recommendations on industry standards. Flag assumptions about the API's infrastructure. Stay focused on load testing, not general performance tuning.
Example Endpoints: /api/v1/users, /api/v1/orders; Traffic profile: 1000 concurrent users, 5000 req/s; Goals: p95 < 200ms, error rate < 1%.
Follow-up prompts
- How do I set up a load test with k6 for this scenario?
- What are the common bottlenecks to look for in the results?
- Can you help me create a report template for load test findings?