Skip to main content

Configuration reference

Loady reads one YAML file and converts its scenarios into an ordered execution plan. The current schema is defined by core/config/yaml_config.go.

Complete schema example

The reserved .test domain below is illustrative. Replace it with a target you own or have explicit permission to test.

name: "Checkout workload"
target: "https://api.example.test"

scenarios:
- name: "Browse and add to basket"
virtual_users: 25
duration: 2m
ramp_up_duration: 30s
ramp_down_duration: 30s

steps:
- name: "List products"
think_time: 500ms-1s
request:
method: GET
url: "https://api.example.test/products"
timeout: 5s
headers:
x-api-key: "${API_KEY}"

- name: "Add product to basket"
think_time: 1s-2s
request:
method: POST
url: "https://api.example.test/basket"
timeout: 5s
headers:
Content-Type: "application/json"
x-api-key: "${API_KEY}"
body: '{"product_id":"product-1","quantity":1}'

Top-level fields

FieldRequiredCurrent behavior
nameYesNon-empty name for the load test.
targetYesMust be an absolute HTTP or HTTPS URL. It is displayed by the CLI but is not used to resolve request URLs.
scenariosYesOne or more scenarios. They run sequentially in file order.

Scenario fields

FieldRequiredCurrent behavior
nameNoDisplay name printed before the scenario runs.
virtual_usersYesInteger from 1 through 300.
durationYesGo duration of at least 60 seconds and less than one hour. This includes ramp-up, hold, and ramp-down.
ramp_up_durationYesGo duration used to add virtual users gradually.
ramp_down_durationYesGo duration used to remove virtual users gradually.
stepsYesOrdered list of steps repeated by every active virtual user.

ramp_up_duration + ramp_down_duration must not exceed duration. The remaining time is the steady hold period.

Step fields

FieldRequiredCurrent behavior
nameYesNon-empty step name.
think_timeYesTwo valid Go durations separated by -, for example 250ms-1s. Use a lower bound smaller than the upper bound.
requestYesHTTP request executed after think time.

The CLI chooses a random think time in the configured range before each request.

Request fields

FieldRequiredCurrent behavior
methodYesOne of GET, POST, PATCH, or DELETE.
urlYesComplete absolute HTTP or HTTPS URL. Relative paths are not supported.
timeoutYesValid Go duration applied to the request context.
headersNoString-to-string HTTP header map.
bodyNoString sent as the request body. Loady does not add a content type automatically.

Environment variables in headers

Loady replaces ${NAME} placeholders in header values with environment variables after parsing:

headers:
Authorization: "Bearer ${API_TOKEN}"
API_TOKEN=secret ./bin/loady start config.yml

Substitution currently applies only to header values. Missing variables remain as their literal ${NAME} placeholders. The target, request URL, and body are not interpolated.

Execution and response handling

Scenarios run sequentially. Within a scenario, each virtual user repeatedly executes every step in order until ramp-down or cancellation.

Every received HTTP response records its latency and status code and currently counts as successful regardless of whether the status is 2xx, 4xx, or 5xx. Transport errors and request deadline failures produce unsuccessful outcomes. Response bodies are not retained or evaluated, and configurable assertions or status-code success criteria are not currently supported.

Cancellation and debug mode

Loady propagates cancellation through scenarios, virtual users, steps, and HTTP requests. Press Ctrl+C to stop a run.

Pass --debug to expose Go's pprof endpoints on localhost:6060 while the test runs:

./bin/loady start config.yml --debug