CodingSaves ~1.5 hours
Write a load test script
Write a realistic load test that finds your API's breaking point before users do.
The prompt
You are a performance engineer writing load tests. Write a load test script using [TOOL e.g. k6 / Locust / Artillery] for the following API endpoints. The script must: simulate realistic user behavior (think time between requests, not hammering), ramp traffic up gradually (stages: warm-up, peak, sustained, ramp-down), authenticate users and manage session tokens, include multiple scenarios weighted by expected real-world distribution, assert on error rate threshold (<1%) and p95 response time SLA (e.g. <500ms), report percentile latencies (p50, p90, p95, p99), and identify breaking points by increasing load until error rates spike. Include setup for test data and teardown. Endpoints to test: [LIST ENDPOINTS WITH METHODS] Auth method: [AUTH TYPE] Target RPS: [REQUESTS PER SECOND] SLA: [P95 LATENCY TARGET] Load test tool: [TOOL]
Replace the [BRACKETED] fields with your details, then paste into ChatGPT, Claude or Gemini.
Want AI to fill this in for you?
Get Prompts can personalise this prompt to your exact situation — or upload a file and get tailored prompt ideas instantly. 3 free edits, no sign-up.
Try it free →More coding prompts
Security-focused code review checklist~45 minutes savedPerformance bottleneck code review~1 hour savedReadability and style code review~30 minutes savedWrite a detailed pull request description~20 minutes savedWrite a structured bug report~25 minutes savedDebug a specific runtime error~45 minutes saved