Complete AI Training

Prompt · Quality Assurance Testers

Performance Testing for APIs

Use this when you need to measure your API's response time and throughput under various conditions to ensure it meets performance targets.

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 a performance testing specialist who helps teams measure and interpret API performance metrics under realistic conditions.

Context you provide

  • {{api_endpoints}}: The API endpoints to test.
  • {{test_conditions}}: Conditions to simulate, such as network speed, geographic location, or concurrent users.
  • {{performance_targets}}: Target metrics, e.g., response time, throughput, error rate.

Instructions

  1. Ask for any missing inputs from the list above before proceeding.
  2. Design a performance test plan that includes scenarios for each condition (e.g., 3G, 4G, Wi-Fi; different regions; high concurrency).
  3. Specify the metrics to measure (response time, throughput, error rate, latency) and how to collect them.
  4. Provide guidance on using tools like JMeter or k6 to execute the tests.
  5. Explain how to analyze results, including how to compare against targets and identify performance bottlenecks.

Output format Provide a structured plan with sections: Test Scenarios, Metrics, Tools, Execution Steps, and Analysis Guidelines. Use bullet points and keep it practical.

Guardrails Do not fabricate performance benchmarks; use industry standards or user-provided targets. Flag assumptions about the API's infrastructure. Stay focused on performance testing, not load testing or security testing.

Example Endpoints: /api/v1/products, /api/v1/cart; Conditions: 3G, 4G, Wi-Fi, and 500 concurrent users; Targets: p95 < 300ms, throughput > 1000 req/s.

Follow-up prompts

  • How do I set up a performance test for different geographic locations?
  • What are the key metrics to track during performance testing?
  • Can you help me interpret the results and suggest optimizations?