/quality-skills:artilleryfrom quality-skills
Designs, implements, debugs, and operates Artillery load tests with YAML-driven scenarios, multiple engines (HTTP, WebSocket, gRPC, Playwright), and CI integration.
Ships in quality-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in Artillery — a Node.js-based, YAML-driven load testing tool (with optional JavaScript hooks). Your goal is to help engineers design Artillery test plans, structure scenarios, gate runs on SLOs, and integrate with CI. Don't fabricate Artillery YAML keys, plugin names, or CLI flags. When uncertain, point the reader to artillery.io/docs.
Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:
artillery report HTML, JSON, or Datadog / Prometheus plugins.If the file does not exist, ask: target traffic shape, environment, engine (HTTP / WebSocket / Playwright), CI provider, and reporting requirements.
When not to use Artillery:
# artillery-checkout.yml
config:
target: "https://staging.example.com"
phases:
- duration: 60
arrivalRate: 0
rampTo: 200
name: "ramp"
- duration: 300
arrivalRate: 200
name: "sustained 200 RPS"
defaults:
headers:
Accept: "application/json"
payload:
path: "./users.csv"
fields: [email, password]
cast: false
order: random
ensure:
thresholds:
- http.response_time.p95: 300
- http.response_time.p99: 800
- http.codes.500: 0
maxErrorRate: 0.5
scenarios:
- name: "browse + checkout"
weight: 4
flow:
- post:
url: "/auth/login"
json:
email: "{{ email }}"
password: "{{ password }}"
capture:
- json: "$.token"
as: "authToken"
- get:
url: "/api/products"
headers:
Authorization: "Bearer {{ authToken }}"
expect:
- statusCode: 200
- think: 2
- post:
url: "/api/checkout"
headers:
Authorization: "Bearer {{ authToken }}"
json:
sku: "sku-001"
qty: 1
expect:
- statusCode: [200, 201]
config.phases is the load profile. Multiple phases stack.config.payload parameterizes via CSV.config.ensure.thresholds is the pass/fail gate.scenarios describe behavior; weight mixes them.| Field | Purpose |
|---|---|
duration | Phase length in seconds. |
arrivalRate | New virtual users per second (open model). |
rampTo | Ramp arrivalRate to this value over duration. |
arrivalCount | Total VUs to spawn over duration (rare). |
name | Friendly label. |
Artillery is open-model by default — arrivalRate is RPS-shaped (new VUs per second), not concurrency-shaped. Good fit for SLO testing.
capture extracts values from a response for later steps:
capture:
- json: "$.token"
as: "authToken"
- header: "x-correlation-id"
as: "corrId"
- regex: "user-([0-9]+)"
as: "userId"
expect asserts on the response:
expect:
- statusCode: 200
- contentType: json
- hasProperty: id
- equals:
- "{{ user.role }}"
- "viewer"
config:
ensure:
thresholds:
- http.response_time.p95: 300
- http.response_time.p99: 800
- http.codes.500: 0
maxErrorRate: 0.5 # percent
The ensure block makes the run pass/fail. Verify exact threshold names against your Artillery version — naming has shifted between major versions.
When YAML can't express the logic (e.g., HMAC signing, dynamic data, complex auth flows), use a JS processor:
config:
processor: "./helpers.js"
scenarios:
- flow:
- function: "generateRequestBody"
- post:
url: "/orders"
json: "{{ requestBody }}"
// helpers.js
module.exports = { generateRequestBody };
function generateRequestBody(requestParams, context, ee, next) {
context.vars.requestBody = {
sku: "sku-" + Math.floor(Math.random() * 100),
qty: 1 + Math.floor(Math.random() * 5),
};
return next();
}
Hooks have lifecycle phases (beforeRequest, afterResponse, beforeScenario, afterScenario) — verify the current names against your installed Artillery version.
artillery run artillery-checkout.yml # standard run
artillery run -o results.json artillery-checkout.yml # JSON output
artillery report results.json -o report.html # HTML report
artillery run --quiet -e production artillery.yml # named environment overrides
artillery run -p ./users.csv -k token=$TOKEN artillery.yml # payload + variables
Verify flags with artillery run --help against your installed version.
- run: npm install -g artillery@<pinned-version>
- run: artillery run -o results.json tests/perf/checkout.yml
- run: artillery report results.json -o report.html
- if: always()
uses: actions/upload-artifact@v4
with:
name: artillery-report
path: |
results.json
report.html
Artillery exits non-zero on threshold breach (the ensure block). Pin the version. For long-running perf programs, push to Datadog / Prometheus / Honeycomb via the appropriate plugin.
| Engine | Use |
|---|---|
http (default) | REST APIs. |
socketio | Socket.IO servers. |
ws | WebSocket. |
playwright | Browser-driven load via Playwright. |
engine-grpc (plugin) | gRPC services. |
Switching engines requires changes to scenario syntax — each engine has its own DSL inside flow. Verify exact field names against the engine docs.
ensure thresholds — run is a benchmark, not a gate.arrivalRate with arrivalCount — Rate is per second, Count is total over the phase. Easy to mis-set.target — parameterize via -e <env> configs or --target CLI override.weight for mix.think — virtual users hammer faster than real ones.--quiet and no JSON output — no post-run analysis possible.expect failure as a build break — by default, expects don't fail the run unless mapped to a threshold. Use ensure for hard gates.config.payload — loaded into memory. Split or stream for very large data.playwright engine for everything — browser load is far heavier per VU; reserve for tests that genuinely need browser rendering.When helping with Artillery, ask:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub aks-builds/quality-skills --plugin quality-skills56 skills in this plugin
/accessibility-testingWhen the user wants to design, implement, or operate accessibility (a11y) testing — automated scans, manual audits, screen-reader testing, WCAG conformance, Section 508 / EAA compliance. Use when the user mentions "accessibility," "a11y," "WCAG," "Section 508," "EAA," "ADA compliance," "axe," "axe-core," "pa11y," "Lighthouse," "aXe DevTools," "screen reader," "NVDA," "JAWS," "VoiceOver," "TalkBack," "WAVE," or "AT testing." For visual diff see visual-regression. For overall test strategy see test-strategy./ai-augmented-testingWhen the user wants to evaluate, adopt, or operate AI-augmented testing tools and approaches — autonomous test generation, self-healing locators, AI-assisted authoring, vision-based testing, agentic test runners. Use when the user mentions "AI testing," "AI-augmented testing," "Testim," "Mabl," "Functionize," "Reflect," "TestRigor," "Tricentis Copilot," "Cypress AI," "Playwright codegen with AI," "AI test generation," "self-healing tests," or "vision-based test automation." For LLM-product evals see llm-eval-testing. For overall strategy see test-strategy./appiumWhen the user wants to design, implement, debug, or scale Appium tests for iOS and Android mobile automation. Use when the user mentions "Appium," "Appium 2," "UiAutomator2," "XCUITest driver," "appium:capabilities," "AppiumServer," "accessibility id," "TouchAction," "W3C Actions," "Appium inspector," "real device cloud," or "App Center / BrowserStack / Sauce mobile." For Android-native frameworks see espresso. For iOS-native see xcuitest. For React Native specifically see detox. For YAML-driven mobile flows see maestro. For desktop web automation see selenium / playwright / webdriverio./bdd-anti-patternsWhen the user wants to audit, refactor, or rescue a Cucumber / Gherkin / SpecFlow / Reqnroll / behave BDD suite from common failure modes. Use when the user mentions "BDD anti-patterns," "Gherkin anti-patterns," "scenario refactoring," "imperative steps," "feature file review," "BDD smells," "BDD failing," "Cucumber feedback loop," "scenarios as scripts," or "is BDD worth it." For Cucumber/Gherkin basics see cucumber-gherkin. For .NET BDD see specflow-reqnroll. For Python BDD see behave./behaveWhen the user wants to design, implement, debug, or operate BDD tests on Python using behave. Use when the user mentions "behave," "behave.ini," "@given/@when/@then," "context.x," "environment.py," "behave hooks," "behave tags," "step definitions in Python," "behave-django," or "behave-pytest." For language-agnostic Gherkin patterns see cucumber-gherkin. For .NET BDD see specflow-reqnroll. For BDD failure modes see bdd-anti-patterns. For non-BDD Python testing see pytest./chaos-engineeringWhen the user wants to design, run, or operate chaos experiments to validate system resilience. Use when the user mentions "chaos engineering," "chaos testing," "fault injection," "Chaos Monkey," "Chaos Mesh," "Gremlin," "Litmus," "Steadybit," "Toxiproxy," "AWS FIS," "kill the database," "latency injection," "GameDay," "blast radius," or "principles of chaos." For security testing see security-testing. For fault simulation in unit tests see wiremock and mutation-testing. For perf testing see k6 / gatling.