Prevent Memory Issues with TestStand Report Generation

Updated Nov 13, 2023



  • TestStand

Operating System

  • Windows

When running tests for long periods of time, you may encounter memory-related errors or crashes due to a large amount of data in the test report.  This document provides details on available TestStand report configurations and methods for mitigating and preventing memory issues.

Prevent Data Loss

To ensure that test data is not lost due to a memory error, enable the On-The-Fly Reporting option. With this option, TestStand writes the report to file as it is generated.

Refer to Enable On-The-Fly Reporting or Logging in TestStand for step-by-step instructions and TestStand Help: Supporting Post-Failure Information Recovery for additional recommended report options.

Only Display Latest Results

The Only Display Latest Results will display the newest results, rather than the entire report.

Refer to Enable On-The-Fly Reporting or Logging in TestStand for step-by-step instructions and TestStand Help: Generating and Viewing the Report during Test Sequence Execution for the recommended report option format when both On-The-Fly Reporting and Only Display Latest Options are enabled.

Discard Results When Not Required by Model

With the Discard Results option, TestStand deletes result data stored in the ResultList array once it has been added to the report. This option only works if On-The-Fly reporting is enabled.
  1. In the TestStand Sequence Editor, click on Configure>>Model Options… The Model Options dialog box appears.
  2. Enable Discard Results or Disable Results when not Required by Model.
  1. Click OK.
For more information, refer to TestStand Help: Model Options Dialog Box.


Minimize Report Size

Consider the type of report that you are creating and the amount of memory it requires. Refer to TestStand Help: Minimizing Report File Size for recommended report formats.

The report format can be configured in the Report Options dialog box.
  1. In the TestStand Sequence Editor, click on Configure>>Result Processing Options… The Result Processing Options dialog box appears.
  2. Select the Options… icon for the Report output.
The Report Options dialog box appears.
  1. Select the desired format from the Report Format drop-down menu.
  1. If you selected the XML or ATML report format, select the style sheet file from the Style Sheet drop-down.
  2. Click OK.


Rearchitect Sequences to Generate Multiple Smaller Reports

If these settings do not solve the memory errors, consider rearchitecting your test sequence to generate multiple smaller reports.  To accomplish this, you can call portions of the test using subsequence calls set to use a new execution.  Since each new execution call generates a new report, you can avoid having very large report files.  The steps below provide a possible implementation of this type of architecture.
  1. Divide the large test into smaller sub-tests.  We use 3 in this example:
  2. In the Step Settings for SequenceCall pane, configure the following settings to call the sub-test in a new execution using the Single Pass entry point:
  1. Enable Use Current File
  2. Select Use New Execution in the Execution Options drop-down list
  3. Select Single Pass in the Entry Point drop-down list
  4. Input “Test 1” (including quotes) as the Value of the sequence parameter
A screenshot of a cell phone  Description automatically generated 
  1. Click on the Sequence Call Advanced Settings icon next to Execution Options.
The dialog box will appear.
  1. Select Before executing next step in the Wait for Execution to Complete: drop-down list.
  2. Click Close.
  3. Refer to TestStand Help: Generating Multiple Reports for Each UUT for the recommended report options for generating multiple reports.