TestStand allows you to configure when each code module is loaded into and unloaded from memory. These settings can drastically impact performance, especially if modules are large or used repeatedly.
You can configure Load/Unload behavior at both the step level and the sequence file level.
Understanding Load and Unload Options
Below is a concise version of the official TestStand Run Options definitions.
Load Options — When the Code Module Loads
| Load Option | Correct Explanation |
|---|
| Preload when opening sequence file | The module loads as soon as TestStand loads the sequence file into memory. Note: It does not preload Sequence Call steps whose module is defined by expression or calls a custom sequence file. |
| Preload when execution begins (Default) | The module loads when any sequence in that sequence file begins executing. |
| Load dynamically | The module loads only at the moment the step is about to execute. Note: Required for conditional execution based on bitness. Preloading a bitness‑specific module causes TestStand to load the wrong module and return an error before execution. |
Unload Options — When the Code Module Releases
| Unload Option | Correct Explanation |
|---|
| Unload when precondition fails | The module unloads if the step’s precondition evaluates to False (meaning the step will not execute). |
| Unload after step executes | The module unloads immediately after the step finishes executing. |
| Unload after sequence executes | The module unloads after the entire sequence that contains the step finishes executing. |
| Unload when sequence file is unloaded *(Default | The module unloads only when TestStand unloads the sequence file from memory. |
Important Note: If Optimize Non‑Reentrant Calls to this Sequence is enabled, TestStand will not unload code modules until execution ends, ignoring both step-level and sequence-file unload settings.
Recommended Load/Unload Settings
For most production test systems:
Best performance configuration
- Load Option: Preload When Opening Sequence File or Preload When Execution Begins
- Unload Option: Unload When Sequence File Is Unloaded
This ensures modules load once and stay in memory for the entire run, eliminating repeated load operations.
How to Configure Load/Unload Options
Step Level
- Select the desired Step.
- Open the Properties tab in the Step Settings pane.
- Select Run Options.
- Adjust Load Option and Unload Option as needed.
Sequence File Level
- Open Edit >> Sequence File Properties…
- In the General tab, choose the Load Option and Unload Option you want to apply to all steps in the sequence file. If you prefer to configure load/unload behavior individually per step, set these fields to Use step load option.
- Click OK to close the Sequence File Properties dialog.
Additional Notes
If memory usage becomes an issue, consider improving the system environment rather than unloading modules aggressively:
- Use TestStand 64-bit to increase memory capacity.
- Increase physical RAM on the test machine.
- Use SSD storage to improve virtual memory performance.