ARTILLERY CHEAT SHEET

Modern Load Testing Toolkit
v1.0
Installation
  • npm i -g artilleryInstall globally
  • npm i artilleryInstall locally
  • artillery versionCheck version
  • artillery quickQuick test
Basic YAML Config
config: target: "https://api.example.com" phases: - duration: 60 arrivalRate: 10 name: "Warm up" - duration: 120 arrivalRate: 50 name: "Ramp up" scenarios: - name: "Get users" flow: - get: url: "/users"
CLI Commands
  • artillery run test.ymlRun test
  • artillery run -o out.jsonSave results
  • artillery report out.jsonGenerate HTML
  • artillery quick -n 100Quick 100 req
  • artillery dinoFun easter egg
Load Phases
  • durationPhase length (sec)
  • arrivalRateNew users/sec
  • arrivalCountFixed user count
  • rampToRamp to rate
  • maxVusersMax virtual users
  • pausePause duration
HTTP Actions
  • get:GET request
  • post:POST request
  • put:PUT request
  • delete:DELETE request
  • patch:PATCH request
  • think:Wait/pause
  • log:Log message
Assertions (expect)
  • statusCode: 200Check status
  • contentType: jsonCheck type
  • hasProperty: idCheck property
  • equals:Exact match
  • matchesRegexp:Regex match
POST Request with JSON
scenarios: - name: "Create user" flow: - post: url: "/api/users" headers: Content-Type: "application/json" json: username: "{{ $randomString() }}" email: "{{ $randomEmail() }}" capture: - json: "$.id" as: "userId"
Built-in Functions
  • $randomString()Random string
  • $randomNumber()Random number
  • $randomEmail()Random email
  • $uuid()Generate UUID
  • $timestamp()Unix timestamp
Config Options
  • payload:CSV data file
  • variables:Global vars
  • defaults:Default headers
  • plugins:Load plugins
  • ensure:Pass/fail conditions
Thresholds (ensure)
config: ensure: p95: 500 # p95 latency < 500ms maxErrorRate: 1 # Max 1% errors max: 2000 # Max latency < 2000ms

Convert a script — free, in your browser

JMeter, k6 and Gatling, any direction. Nothing is uploaded.

All 51 cheat sheets

Free to read and free to print — no signup. Want them as A4 PDFs you can print? Get all 51 as a PDF bundle for £14.99.
A Martkos IT reference sheet · Blog · Free tools