Run flows locally
Run a flow
npx stresseur flow run api-tests/checkout.yamlflow.yaml checkout
Without a flow name, it runs the file’s run: list.
It reads APP_URL and the other variables from ./.env.stresseur.local (where init writes when git tracks .env), then ./.env, then the .env next to the flow file. Variables set in the shell win:
APP_URL=http://localhost:3000 npx stresseur flow run api-tests/checkout.yamlflow.yaml checkout
If a variable the flow uses is not set, it stops before the first step and names it. STRESSEUR_BASE_URL, the name before 0.4, still works.
Flows can make values per run with uuid(), ulid(), now() and faker.*, e.g. email: 'u{{ lower(ulid())[16:] }}@example.com'.
Run like CI
npx stresseur ci
Runs every flow in api-tests/ 13 times (1 warm-up, 12 measured), prints per-step timings and writes .stresseur/ci-report.json. Reads ./.env. Exits 1 if any step failed.
Load test locally
Use the load: block that generate adds to the flow file, or describe the load inline:
npx stresseur flow run api-tests/checkout.yamlflow.yaml checkout --scenario smoke
npx stresseur flow run api-tests/checkout.yamlflow.yaml checkout --vus 10 --duration 60s
Exit codes: 99 a threshold failed, 108 an abort rule stopped the run, 1 the run could not start.
Reports: --report json:out.json or --report junit:out.xml.