Work with as-code

As-code means your performance test is a set of YAML files in your repository, next to the application it tests. The files are machine-readable, so you, a script, or an AI assistant can write, check, and run the test from your repository.

If a user path no longer matches the application, the check fails on your machine on the commit that broke it. You find the problem right away, not weeks later in a scheduled load test. You also find it before a test run consumes virtual user resources.

Common use cases

Use as-code in the following situations:

  • You build the application and want a performance test in the pipeline without learning a test design tool. You describe the test in YAML from the routes and specifications you already have, and the build fails when a user path breaks.

  • You maintain performance tests across many services, and you need to keep them aligned with the applications. Tests in the same repository as the code follow the same reviews and the same history.

  • You want an AI assistant to draft the test. Because every local check reports an exit code and a JSON file, the assistant can run its own YAML, read the failure, fix it, and try again without your help.

The NeoLoad CLI

The NeoLoad command-line interface (CLI) checks your project on your machine and runs it in NeoLoad Web. It's a Python package that you run from your terminal with the neoload command. You write and check an as-code project without the NeoLoad desktop application. To run local checks, it needs Java Development Kit 21 or later. Check out Install the NeoLoad CLI for the setup, which includes how to run NeoLoad CheckVU on a machine with no outbound access. To run a test in NeoLoad Web, the CLI still needs a connection to it.

The as-code YAML format

The CLI validates your project against a schema before it sends any request. Write as-code YAML covers the project root, how to split a project across files, and the handful of mistakes the schema rejects most often.

NeoLoad CheckVU

NeoLoad CheckVU is a command that runs each user path once against your real application and tells you whether it completes. It catches a wrong URL, an extractor that no longer matches, or a broken assertion, and it uses no virtual user resources. Check your first user path shows the whole cycle on one project, and NeoLoad CheckVU documents every option, environment variable, and limitation.

Tests in NeoLoad Web

To see how your application behaves under load, run the project in NeoLoad Web through the CLI. This test run also shows whether an authenticated session stays active from one iteration to the next. The CLI uses the same project file you checked locally and produces a complete test result with a few commands.

Checks in your pipeline

The same neoload checkvu command you run by hand works as a build step, so a broken user path shows up in the build that caused it. Automate as-code checks in your pipeline covers the exit-code gate, log storage, and secret management. For the machine-readable result behind it, check out The NeoLoad CheckVU result file.

NeoLoad CLI and NeoLoadCmd

NeoLoad ships two command-line tools. Both can run YAML project files, but they run tests in different places. The NeoLoad CLI works with as-code YAML projects and with NeoLoad Web, and it's the one these topics cover. NeoLoadCmd belongs to the NeoLoad desktop application. It runs a test from a desktop project or from YAML project files on a local controller.