Dev Load Testing Plan Writer ============================ Create a load testing plan for [application/endpoint]. Application details: - Target: [specific endpoints or full application] - Current capacity: [known or unknown] - Expected peak load: [requests per second/users] - SLA requirements: [response time/error rate] - Tool: [k6/JMeter/Locust/Artillery] - Environment: [staging/production-like] LOAD TESTING PLAN 1. OBJECTIVES - Establish baseline performance - Find breaking point (stress test) - Verify SLA can be met at peak load - Identify bottlenecks before production 2. TEST SCENARIOS SCENARIO 1 — BASELINE - Users: [expected normal load] - Duration: [10 minutes] - Ramp up: [1 minute] - Goal: [establish normal metrics] SCENARIO 2 — PEAK LOAD - Users: [expected peak] - Duration: [15 minutes] - Ramp up: [3 minutes] - Goal: [verify SLA at peak] SCENARIO 3 — STRESS TEST - Users: [2-3x expected peak] - Duration: [until failure or 20 minutes] - Goal: [find breaking point] SCENARIO 4 — SOAK TEST - Users: [normal load] - Duration: [1-2 hours] - Goal: [find memory leaks/degradation] 3. TARGET ENDPOINTS | Endpoint | Expected Load | SLA Target | | GET /api/products | [X req/s] | [<200ms p99] | | POST /api/orders | [X req/s] | [<500ms p99] | | GET /api/search | [X req/s] | [<300ms p99] | 4. SUCCESS CRITERIA - Response time: p99 < [Xms] at peak load - Error rate: < [X%] at peak load - Throughput: [X] requests/second sustained - No memory leaks: [memory stable over time] - CPU: < [X%] at peak load 5. TEST SCRIPT STRUCTURE (k6 example) ```javascript import http from 'k6/http' import { check, sleep } from 'k6' export const options = { stages: [ { duration: '1m', target: 50 }, // ramp up { duration: '10m', target: 50 }, // stay { duration: '1m', target: 0 }, // ramp down ], thresholds: { http_req_duration: ['p99<500'], http_req_failed: ['rate<0.01'], }, } export default function() { const res = http.get('https://staging.example.com/api/products') check(res, { 'status is 200': (r) => r.status === 200, 'response time OK': (r) => r.timings.duration < 500, }) sleep(1) } ``` 6. MONITORING DURING TEST - Response time: [dashboard link] - Error rate: [dashboard link] - Server CPU/Memory: [dashboard link] - Database connections: [monitor] - Cache hit rate: [monitor] 7. RESULTS DOCUMENTATION | Scenario | Peak RPS | p50 | p95 | p99 | Error Rate | | Baseline | [] | []ms | []ms | []ms | [%] | | Peak Load | [] | [] | [] | [] | [] | | Stress | [] | [] | [] | [] | [] | Source: https://promptzyo.com/prompt/dev-load-testing-plan-writer