1---2name: quality-engineering-api-performance-testing3description: Specify tool-neutral API load, stress, and recovery testing with parameterized workload models, SLO percentiles, and finite overload bounds. Use when evaluating API latency, throughput, saturation, or recovery behavior under concurrent traffic.4metadata:5 source: https://skillmd.com/skills/hoangnguyen0403/quality-engineering-api-performance-testing6 triggers:7 files:8 - "tests/perf/**/*.json"9 - "tests/load/**/*"10 keywords:11 - api load testing12 - api performance testing13 - stress testing14 - api recovery testing15 - arrival rate16 - p95 latency17 - p99 latency18---1920# API Performance, Load, and Recovery Testing2122## **Priority: P1 (HIGH)**2324## Workflow25261. **Parameterize Workload**: Source arrival rate vs concurrency, request mix, duration, and SLO percentiles from approved requirements/SLOs. Missing approvals block execution, not offline planning.272. **Preflight & Bound (C4)**: Verify explicit target authorization and synthetic isolation. Enforce distinct finite ceilings, each with its own unit — `maxArrivalRateRps`, `maxInFlightRequests`/`maxConcurrency`, `maxPayloadBytes`, duration — plus cancellation hooks and continuous stop tripwires. A rate ceiling is not a concurrency bound.283. **Establish Phase-Specific Baseline**: Exclude warmup. Measure baseline throughput, success latency, error latency ($p50, p95, p99$), and baseline error budget.294. **Evaluate Overload & Degradation**: Apply stepped ramp up to authorized stress cap. Distinguish expected shedding (e.g. 429/503) from unexpected system faults; abort if tripwires fire.305. **Verify Post-Overload Recovery**: Drop traffic to baseline/zero. In a dedicated post-stress window, verify return to baseline latency, error budget restabilization, and resource release against approved recovery SLO.316. **Capture Evidence (C3)**: Emit complete C2 scenario and C3 evidence records; record unexecuted runs as BLOCKED/NOT RUN with explicit missing prerequisites.3233## Workload Specification (AC-11)3435- **Model Selection**: Select **open model** (constant arrival rate) for uncoordinated/public traffic; **closed model** (virtual users) for coordinated/batch workers.36- **Request Mix**: Proportions of endpoints, read/write ratio, and data variance parameterized from production profiles or approved requirements.37- **Warmup & Measurement**: Explicit warmup window (metrics discarded from SLOs) preceding steady-state observation.38- **SLO Metrics (Success & Error)**: Record both successful and error response latencies ($p50, p95, p99$), throughput (RPS), error budget, and resource saturation.39- **Approval Gate**: Operational targets must originate from approved specifications. If unapproved, mark execution `BLOCKED: Missing approved SLO threshold for <metric>`; continue offline planning. Numeric examples in references are synthetic fixture contracts only.4041## Overload, Tripwires, and Recovery (AC-12)4243- **Ramp & Bounds**: Define stepped ramp with finite duration, arrival-rate, in-flight concurrency and payload ceilings, plus explicit abort signals (C4). Each ceiling is checked and reported separately; an approved rate without an approved in-flight ceiling keeps execution `BLOCKED`.44- **Continuous Tripwires**: Abort immediately if unexpected faults (e.g. unhandled 5xx, socket drops) or critical saturation breach approved safety limits.45- **Phase-Specific Oracles**:46 - *Overload Phase*: Expected shedding (429/503 with Retry-After) does not fail the run; unexpected 5xx crashes and hangs fail.47 - *Recovery Phase*: Post-stress observation window evaluates return to baseline latency, error budget reset, and queue/connection release against approved recovery SLO. Merely observing 503 shedding is not a pass.4849## Tool-Neutral Execution & Readiness5051- Core procedures are runner-agnostic. Check for installed drivers (e.g. k6, autocannon).52- **Execution Readiness**: Driver presence alone does not authorize execution. Unless the harness supports target authorization, continuous tripwire aborts, phase separation, and post-load recovery observation, mark execution as `BLOCKED: Missing execution safety/recovery controls`.5354## Anti-Patterns5556- **No unapproved numeric defaults**: Never invent universal latencies, error percentages, tripwires, or recovery windows.57- **No whole-run error pooling**: Do not fail healthy overload shedding against steady-state error budgets.58- **No success-only latency filtering**: Record both success and error response latencies.59- **No unverified recovery**: Rejection status codes under peak load do not prove post-load recovery.60- **No unauthorized execution**: Missing target authorization or safety controls blocks live execution.6162## References6364- [Workload Modeling & SLOs](references/workload-modeling.md) — Open vs closed models, phase separation, success/error latencies, and approval gates.65- [Overload, Stop Conditions & Recovery](references/overload-and-recovery.md) — Phase-specific oracles, parameterized tripwires, recovery evaluation, and synthetic fixtures.66- [Driver Execution & Integration](references/driver-execution.md) — Readiness gates, partial runner sketches, complete C2/C3 schemas, and BLOCKED records.