Getting Started

Install Fusillade and run your first load test

Installation

# npm (recommended)

npm install -g @fusillade-io/fusillade

# Linux

curl -sSL https://github.com/Fusillade-io/Fusillade/releases/latest/download/fusillade-linux-x64 -o fusillade
chmod +x fusillade
sudo mv fusillade /usr/local/bin/

# macOS (Apple Silicon)

curl -sSL https://github.com/Fusillade-io/Fusillade/releases/latest/download/fusillade-macos-arm64 -o fusillade
chmod +x fusillade
sudo mv fusillade /usr/local/bin/

# macOS (Intel)

curl -sSL https://github.com/Fusillade-io/Fusillade/releases/latest/download/fusillade-macos-x64 -o fusillade
chmod +x fusillade
sudo mv fusillade /usr/local/bin/

# Windows (PowerShell)

Invoke-WebRequest -Uri "https://github.com/Fusillade-io/Fusillade/releases/latest/download/fusillade-windows-x64.exe" -OutFile "fusillade.exe"

# From source (Cargo)

cargo install fusillade

# Verify installation

$ fusillade --version
$ fusi --version  # Short alias

Quick Start

# Initialize a new project

$ fusillade init -o my-test.js --config

# test.js

export const options = {
  workers: 10,
  duration: '30s',
  thresholds: {
    'http_req_duration': ['p95 < 500'],
    'http_req_failed': ['rate < 0.01'],
  }
};

export default function() {
  const res = http.get('https://api.example.com/users');

  check(res, {
    'status is 200': (r) => r.status === 200,
    'protocol is HTTP/2': (r) => r.proto === 'h2',
  });

  sleep(1);
}

# Run

$ fusillade run test.js
$ fusi run test.js  # Short alias

Shell Completion

Enable tab-completion for commands and flags:

# Bash

$ fusillade completion bash >> ~/.bashrc && source ~/.bashrc

# Zsh

$ fusillade completion zsh >> ~/.zshrc && source ~/.zshrc

# Fish

$ fusillade completion fish > ~/.config/fish/completions/fusillade.fish

# PowerShell

$ fusillade completion powershell >> $PROFILE

IDE Support

Generate a JSON Schema for config file validation:

$ fusillade schema -o fusillade.schema.json

Use with VS Code YAML extension for autocomplete in config files.

Next Steps

Configuration - Learn about all available options, executors, and scenarios

HTTP API - Master the HTTP module with requests, responses, and cookies

CLI Reference - Explore all CLI commands and flags