HTML & JSON reports
Save reports without overwriting previous runs and understand report output.
On this page
Choose the right working directory. Examples using
npm runshortcuts,node bin/loadstride.js, or top-levelstarter-kit/paths run from the LoadStride source checkout. Those shortcuts do not exist in your application’s package.json. Installed-package users runnpx --no-install loadstridefrom their application directory. See Getting started for both options.
Report output
node bin/loadstride.js run load-tests/api.js --report-dir reports/api
Each completed run creates a new directory:
reports/
api/run-<UTC timestamp>-<unique suffix>/report.json
report.html
arrival/run-.../
ramp/run-.../
scenarios/run-.../
browser/run-.../
transactions/run-.../
benchmarks/accuracy-.../
capacity-.../
archive/root-.../ Reports previously generated at the project root
The random suffix prevents collisions even when runs finish at the same time. The CLI prints absolute JSON and HTML paths. Open the HTML file directly in a browser; it works offline. JSON provides machine-readable results. Threshold and iteration failures still produce reports; configuration errors do not produce a completed-run report. Interrupted runs produce reports when the engine can return a partial result; forced termination cannot guarantee output.
test:load, test:arrival, test:ramp, test:scenarios, test:transactions, and browser:demo use
these directories automatically. browser:run accepts --report-dir explicitly.
Direct CLI runs remain terminal-only unless an output flag is supplied.
For exact filenames, use --json reports/custom/result.json and/or
--html reports/custom/result.html. Parent directories are created automatically;
explicit filenames overwrite earlier files at those paths. Do not combine these
flags with --report-dir. To replace an npm shortcut’s output policy, invoke the
CLI directly rather than appending incompatible output flags.
Generated reports and recordings are ignored by Git and excluded from the npm package. No automatic retention/deletion policy is applied; archive or remove old results as needed. Browser metrics and HTTP helper metrics have distinct meanings; see the README before comparing them. These are aggregate run reports, not a time-series dashboard or Allure integration.
The console, JSON, and HTML include endpoint and transaction breakdowns; see metric breakdowns for labels, timing, failure rules, and limits.
Browse completed runs with npm run report:serve at http://127.0.0.1:8080.
See report-server hosting for company-network binding, limits,
and access policy, or Jenkins for build-page publication.
--html-external-css alongside --html or --report-dir writes
<HTML filename>.css and references that file from the report. Both files must stay
together. This is useful for Jenkins’ same-origin stylesheet policy. It does not
alter JSON or create Allure results.
Console summary
After each run, LoadStride prints an aligned metric table with named check outcomes, total
received payload, request latency, iteration duration, counts/rates, observed peak
active VUs, configured concurrency, arrival drops, and generator diagnostics.
Latency and iteration rows show avg/min/median/max/p95/p99 in milliseconds. Iteration
duration includes the full function, including sleeps and failed or aborted attempts.
The iterations counter still counts successful completions only.
Named checks are included in JSON as checkResults. The first 100 distinct names
are retained; additional names are combined into one overflow row while all checks
continue contributing to aggregate totals. peakVUs records the highest observed
number of in-flight iteration functions, independently of the configured cap.
Values use cyan in interactive terminals, successful checks use green, and failed
checks or thresholds use red. Logs stay plain text, and NO_COLOR=1 disables color.
The final done/interrupted bar reflects elapsed load time or started iteration count;
it is separate from the pass/fail result. Network-phase timings (DNS, connection,
TLS, send, wait, receive) and transmitted bytes are not currently instrumented and
are omitted. Received bytes remain decoded response payload rather than wire bytes.
Live terminal progress
Every test run starts with a LoadStride ASCII banner and the script, executor, duration or
iteration count, concurrency settings, and report destinations. The banner uses
cyan in interactive terminals and plain text in logs. Set NO_COLOR=1 to disable
color. Help and version commands keep their compact output.
The npm load-test commands automatically show live progress in interactive terminals. Updates are written to stderr once per second and refresh a single line, showing elapsed time, percentage, active VUs, request counts, recent request rate, failures, drops, the current target, and the stage where applicable. Long lines are shortened to the terminal width. Fixed-iteration progress uses started iterations; 100% does not imply that all work has finished or that thresholds passed.
Duration-based runs show draining after the scheduling deadline while active iterations finish. The final summary and reports still determine pass/fail. For ramping workloads, targets are the configured values while active VUs are measured in-flight iteration functions. Requests per second is calculated since the preceding update, rather than averaged over the entire run. Progress is best effort: a blocked event loop can delay display updates as well as load scheduling.
npm run test:load -- --progress plain # Newline updates for logs / CI
npm run test:ramp -- --progress off # Final summary only
--progress auto is the default and suppresses progress when stderr is redirected
or piped. plain prints newline updates without terminal escape sequences; off
disables updates. Set LOADSTRIDE_PROGRESS=plain or off in .env or the shell to choose
a default; a CLI flag takes priority. Stdout retains the final summary. If test
scripts print frequently, use plain mode or disable live progress.
The engine also supports synchronous progress callbacks:
import { run } from 'loadstride';
const result = await run(scenario, {}, {
progressInterval: 1000, // Milliseconds; minimum 100.
onProgress(snapshot) {
console.log(snapshot.phase, snapshot.activeVUs, snapshot.requests);
},
});
Callbacks receive setup, running/draining, optional teardown, and final finished/interrupted snapshots. A callback exception aborts cooperative work and surfaces as a runtime error. No timer is created when no callback is configured; progress snapshots are not retained in reports and are not time-series history.
Based on the released v0.2.0 guide. View source on GitHub.