Troubleshooting

Resolve common installation, configuration, recording and reporting problems.

Check your installation

From your application directory:

node --version
npx --no-install loadstride --version

Use Node.js 20 or newer. If the executable is missing, install loadstride@0.2.0 in this directory. npm run test:load and browser:run belong to the LoadStride source checkout; installed users use the npx CLI.

Scripts fail to load

Use a .mjs extension for your application’s script, or set "type": "module" in its package.json. Save the file before running it and check the path relative to your terminal’s current directory. Await HTTP requests and sleep calls.

Configuration behaves unexpectedly

Precedence is CLI flags, then shell environment, then the selected env file, then script options. --no-env skips env files but does not clear shell variables. Review exported LOADSTRIDE_ settings and choose either a fixed-VU or an arrival-rate workload. Browser mode rejects arrival/stage/scenario settings.

When running source directly with an explicit env file, use Node’s argument boundary:

node -- bin/loadstride.js run starter-kit/basic.js --env-file staging.env

The installed executable already includes that boundary. See Configuration.

The demo API cannot start or requests fail

Port 3000 may already be in use. Use your own reachable test API and update your script or --url. Custom scripts must read process.env.TARGET_URL for --url to affect their requests. Browser recording’s included login demo uses port 3001.

In Jenkins or a remote runner, 127.0.0.1 points to that machine, not your laptop. Check reachability and login details from the machine running the workload.

Browser recording or replay fails

Install Playwright, Acorn and the matching browser binary as described in Browser testing. Inspect the generated script and its printed input variables. Recorders replace typed inputs with placeholders; review selectors, URLs, other values and assertions yourself.

Validate one iteration with --headed before scaling. Use a dedicated browser env file or --no-env and remove conflicting shell settings. Browser mode supports fixed VUs only and one workload, with a configurable ceiling (default 20 VUs). For higher counts, use --vus N --browser-max-vus N after measuring your flow with browser calibration. A CPU/RAM projection does not establish a tested capacity or remove event-loop bottlenecks.

HAR import replays HTTP requests rather than a rendered UI. Dynamic tokens, resource IDs and authentication may need manual correlation; see HAR import.

Requested load differs from delivered load

VUs are concurrency; arrival rate is iteration starts per second. One iteration can make several requests. Slow iterations can exhaust the arrival VU cap; generator pressure can also cause dropped starts. Inspect drops, scheduling delay, CPU and event-loop diagnostics before increasing the cap.

Blocking JavaScript shares the Node.js process with every VU. Keep it out of request loops. See load models for the accounting and limitations.

Reports are missing or a run failed

Direct CLI runs print to the terminal unless output is requested. Use --report-dir reports/my-test for unique HTML/JSON run folders. Point the report server at that same output root. It reads files under the selected directory, not the directory where your test scripts live.

Threshold and iteration failures normally retain reports. Configuration or hook errors may prevent a completed-run report. Normal CLI exit codes are:

Code Meaning
0 Run passed
1 Threshold or iteration failure
2 Configuration or runtime error
130 Interrupted

Review the console error before retrying. Missing samples can fail thresholds; an HTTP 200 alone does not prove business success. Use metrics and thresholds to interpret the result.

For reports served by Jenkins, use --html-external-css and retain the generated CSS next to the HTML. The CI/CD guide explains the publication setup.

Report a reproducible issue

Include the exact CLI command, LoadStride/Node/OS versions and a small script against a local test target. Remove credentials and private data from recordings, reports and logs before sharing them. File the example in GitHub issues.