Project files
You can load a NeoLoad project for execution from:
-
A NeoLoad Controller project file.
-
One or more YAML files.
-
A NeoLoad Controller project file together with YAML files that complement or override it.
Use multiple files
You can put each element of a test configuration in its own YAML file: SLA profiles, variables, servers, virtual user paths, populations, and scenarios. Declare the project to launch with the -project argument, then list the YAML files that hold the elements.
Declare all the elements of a virtual user path in one single file. You can't split one virtual user path across several files.
The following command launches the MyScenario scenario and takes each type of element from its own file:
NeoLoadCmd.exe -project "<neoload projects path>/MyProject/MyProject.nlp" "<neoload projects path>/myproject-slaprofiles.yaml" "<neoload projects path>/myproject-variables.yaml" "<neoload projects path>/myproject-servers.yaml" "<neoload projects path>/myproject-userpaths.yaml" "<neoload projects path>/myproject-populations.yaml" "<neoload projects path>/myproject-scenarios.yaml" -launch MyScenario
A test project element in a YAML file replaces the element of the same name in the NeoLoad project. If the element doesn't exist in the NeoLoad project, NeoLoad adds it to the project.
Include other files
A YAML file can include other files. An included file must declare top-level project elements, the same as any separate YAML file. It can't define an element nested inside another one, such as a transaction inside a virtual user path.
Example
Here, runtime-STAGING.yaml pulls in the shared design and the two files that describe the staging environment:
includes:
- common/design.yaml
- STAGING/servers.yaml
- STAGING/variables.yaml
Default file
When you run a scenario without naming the YAML files to load, NeoLoad looks for a file called default.yaml in the project files and loads that one.
default.yaml can hold all the as-code content itself, or it can include other files.