Locked & Loaded

A Brief Introduction to Artillery Load Testing

Slides

Recording

Overview

Artillery is a YAML-configured load testing tool. A scenario file defines virtual user flows — login, browse, submit — and Artillery ramps those flows to whatever volume and duration you need. It runs from your laptop or from a CI step, with no separate load testing infrastructure to manage. Here’s what a minimal scenario looks like:

config:
  target: 'https://api.yourapp.com'
  phases:
    - duration: 60      # ramp up over 60 seconds
      arrivalRate: 5    # start at 5 virtual users/sec
    - duration: 120     # hold load for 2 minutes
      arrivalRate: 50   # 50 virtual users/sec

scenarios:
  - name: 'Login and fetch profile'
    flow:
      - post:
          url: '/auth/login'
          json:
            email: '{{ $randomEmail }}'
            password: 'testpass'
          capture:
            - json: '$.token'
              as: 'authToken'
      - get:
          url: '/profile'
          headers:
            Authorization: 'Bearer {{ authToken }}'

Run with artillery run scenario.yml. Output shows p50, p95, p99 latency and error rates in real time. That’s enough to know whether your code can handle a traffic spike before it happens in production.

What We Covered

What load testing is and why it matters: A service that handles 10 req/s in development may fall over at 50. Load tests surface the threshold before users do, and they surface it at a point when you can still fix it.

Writing scenarios: Configuring ramp-up, constant load, and spike scenarios. How to chain requests with captured tokens (log in, then make authenticated calls).

CI/CD integration: Running Artillery as a build step. Failing the pipeline when p99 latency exceeds a threshold or when error rate crosses a percentage. This is the part most teams skip, and it’s the part that actually protects production.

Resources

Event Details

Format: Workshop
Community: Testaholics Anonymous — Past Events