| name | Artillery Load Testing |
| description | Write and run Artillery load tests with YAML phases and scenarios, CSV data payloads, the expect plugin for functional checks, and ensure thresholds that fail CI when latency or error budgets are breached. |
| version | 1.0.0 |
| author | thetestingacademy |
| license | MIT |
| tags | ["artillery","load-testing","performance","stress-testing","yaml","thresholds","ci","api","latency"] |
| testingTypes | ["load","performance"] |
| frameworks | ["k6"] |
| languages | ["javascript"] |
| domains | ["api","web"] |
| agents | ["claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","gemini-cli","amp"] |
Artillery Load Testing
This skill makes an AI agent author Artillery 2.x load tests as declarative YAML: realistic traffic phases, multi-step scenarios with captured variables, CSV-driven virtual user data, functional expect checks inside load flows, and ensure thresholds that turn latency regressions into red CI builds. Trigger it when a project contains artillery.yml, artillery in package.json, or when the user asks for load, stress, soak, or spike testing of an HTTP API or website in a Node.js stack.
Core Principles
- Model traffic in phases, never one flat rate. Real load has a warm-up, a ramp, and a sustained plateau. A single
arrivalRate hides cold-start effects and autoscaling lag. Always define at least warm-up, ramp, and sustain phases.
arrivalRate is new virtual users per second, not concurrency. Each arriving VU runs the whole scenario. If your scenario takes 10 seconds and you arrive 50/sec, you have roughly 500 concurrent users. Calculate this before picking numbers.
- Thresholds belong in the test file, not in a wiki. Use the
ensure plugin so artillery run exits non-zero when p95/p99 or error rate budgets are blown. A load test that cannot fail is a demo, not a test.
- Assert correctness under load with
expect. A server returning 200 with an empty body at p99 latency is still broken. Check statusCode, contentType, and hasProperty inside the flow.
- Parameterize virtual users from CSV payloads. Hammering one account exercises one cache line and one DB row. Use
payload with hundreds of distinct credentials and SKUs to defeat caches realistically.
- Never load test production without a plan; never load test third parties at all. Point Artillery at a staging environment sized like production, announce test windows, and rate-limit anything that crosses a vendor boundary.
Setup
npm install --save-dev artillery@latest
npx artillery version
npx artillery run load/checkout.yml
npx artillery run load/checkout.yml --output artillery-report.json
Patterns
1. Phases and a multi-step scenario with capture
{}
{}