ConfigsApr 15, 2026·3 min read

Artillery — Modern Load Testing for HTTP, WebSocket & More

Node.js load testing toolkit with YAML scenarios covering HTTP, WebSocket, gRPC and Playwright, plus distributed runs on AWS Fargate.

TL;DR
Artillery provides load testing with YAML scenarios for HTTP, WebSocket, gRPC, and Playwright, plus distributed execution on AWS Fargate.
§01

What it is

Artillery is a Node.js load testing toolkit that uses YAML scenario files to define test configurations. It supports HTTP, WebSocket, gRPC, and browser-based testing via Playwright. Artillery handles both quick smoke tests from the command line and complex multi-step scenarios with variable injection, response capture, and conditional logic.

Artillery targets backend developers, QA engineers, and SRE teams who need to verify application performance under load. It scales from local single-machine tests to distributed runs on AWS Fargate for production-level load generation.

§02

How it saves time or tokens

Artillery's YAML-based approach means you write test scenarios declaratively rather than programming test scripts. A few lines of YAML define ramp-up patterns, request sequences, and success criteria. The built-in reporting shows latency percentiles, error rates, and throughput. Distributed mode on AWS Fargate generates load from multiple regions without managing infrastructure.

§03

How to use

  1. Install Artillery: npm install -g artillery.
  2. Run a quick smoke test: artillery quick --count 100 --num 5 https://api.example.com/health.
  3. Create a YAML scenario file for complex test patterns and run with artillery run load.yml.
§04

Example

# load.yml
config:
  target: 'https://api.example.com'
  phases:
    - duration: 60
      arrivalRate: 10
      name: 'Warm up'
    - duration: 120
      arrivalRate: 50
      name: 'Sustained load'
    - duration: 60
      arrivalRate: 100
      name: 'Peak load'

scenarios:
  - name: 'API workflow'
    flow:
      - get:
          url: '/api/items'
          expect:
            - statusCode: 200
      - post:
          url: '/api/items'
          json:
            name: 'test-item'
          capture:
            json: '$.id'
            as: 'itemId'
      - get:
          url: '/api/items/{{ itemId }}'
# Run the test
artillery run load.yml

# Quick smoke test
artillery quick --count 100 --num 5 https://api.example.com/health
§05

Related on TokRepo

§06

Common pitfalls

  • Local machine network and CPU limits constrain load generation. For tests above a few hundred requests per second, use distributed mode on AWS Fargate.
  • YAML scenario syntax is specific to Artillery. Do not confuse it with other load testing tools' configuration formats.
  • Response time measurements include network latency from the load generator. When testing locally against a remote server, network conditions affect results.

Frequently Asked Questions

How does Artillery compare to k6?+

Artillery uses YAML for test definition while k6 uses JavaScript. Artillery has built-in distributed execution on AWS Fargate; k6 has k6 Cloud. Both support HTTP, WebSocket, and gRPC. Artillery is simpler for basic tests; k6 offers more scripting flexibility.

Can Artillery test WebSocket connections?+

Yes. Artillery has built-in WebSocket support. You define WebSocket scenarios in YAML with connect, send, and expect steps. It measures connection time, message latency, and throughput.

Does Artillery support browser-based testing?+

Yes, through the Playwright engine. You can write browser-based scenarios that navigate pages, fill forms, and assert on page content under load. This tests the full user experience, not just API endpoints.

How does distributed testing work?+

Artillery Cloud and the Fargate integration distribute load generation across multiple machines. You run artillery run --platform aws:fargate load.yml to spin up workers that generate load from AWS infrastructure.

What metrics does Artillery report?+

Artillery reports request count, response time percentiles (p50, p95, p99), error rates, throughput (requests/second), and HTTP status code distribution. Reports can be exported as JSON or HTML.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets