Automate as-code checks in your pipeline
Because an as-code project is a set of files in your repository, your pipeline can check it the same way it checks the rest of your code. A user path that stopped working shows up in the build that broke it, rather than weeks later when someone schedules a load test.
The check is cheap enough to run on every commit: it runs each user path once, on the runner, and consumes no virtual user resources.
Before you start
Your runner needs the following available, whether preinstalled on the runner image or installed as a build step:
-
Python 3, and the NeoLoad command-line interface (CLI) installed with pip install neoload.
-
Java Development Kit 21 or later.
-
Network access to the application under test, and to the CheckVU engine download unless you supply the engine yourself.
Gate the build on the exit code
Install the CLI and run NeoLoad CheckVU as a build step:
pip install neoload
neoload checkvu -w "<job-work-dir>" --output "<job-output-dir>" default.yaml
neoload checkvu exits 0 when every user path passes and 1 otherwise. Most build systems already fail a job when a step exits non-zero, so the gate usually needs nothing beyond running the command.
Gate on the exit code rather than on the console output, which is written for people and can carry extra lines from the engine underneath.
Keep the logs and the result
A failing build is only useful if you can see why it failed. Archive the following items as artifacts:
-
The verdict and the failures, in checkvu-result.json under the folder you named with --output. Without that option, there's no result file to archive. Check out The NeoLoad CheckVU result file for the fields.
-
The logs folder inside the work directory you named with -w. Without that option, the engine works in a temporary directory and deletes it on exit, which takes the logs with it.
Give every job its own --output folder and its own work directory. A run deletes everything in its --output folder before it starts. If two jobs share one directory, the second deletes the first job's results.
Keep the work directory outside the checked-out project. The engine copies the whole project root on every run, so a work directory inside the project makes each run copy the one before it.
Cache the engine between builds
The first run on a fresh runner downloads the CheckVU engine, and a container that starts clean every time repeats that download. To avoid it, choose one of the following options:
-
Cache the CLI's engine directory between builds, using your build system's own caching. For the per-platform paths, check out Install the NeoLoad CLI.
-
Keep the engine in your internal artifact store and point at it with -e. This is also the approach that works on a runner with no outbound access.
Handle secrets
Read every credential from your build system's secret store, and pass it to the CLI as an environment variable rather than write it into a command. Anything on a command line can surface in a job log or a process list.
The --output folder needs the same care. Alongside the result file, it receives every request and response your user paths made, with headers and bodies in plain text and nothing masked. Restrict who can download those artifacts and expire them on a schedule.
The CheckVU proxy password is designed around this: it has no command-line option at all, and comes only from NEOLOAD_CHECK_VU_APP_PROXY_PASSWORD. For the proxy options themselves, check out NeoLoad CheckVU.
What's next
Once the check passes on every commit, run the project in NeoLoad Web to add a scheduled load test on top of it.