Complete AI Training

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.

All 20 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

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

  1. Ask for any missing inputs from the list above before proceeding.
  2. Design a load testing strategy that includes test scenarios (e.g., ramp-up, spike, soak) based on the provided traffic profile.
  3. Recommend appropriate tools (e.g., k6, JMeter, Locust) and explain how to configure them for the scenarios.
  4. Outline the key metrics to monitor (response time, throughput, error rate, resource utilization) and how to interpret them.
  5. 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?