Addressing Memory Issues with Report Generation in TestStand

Publish Date: Mar 04, 2014 | 3 Ratings | 4.00 out of 5 | Print

Overview

When running tests that will last for multiple hours, days, or even weeks, you may encounter memory related errors or crashes due to the large amount of data in the test report.  This document provides details on available methods for mitigating and preventing these types of issues.

Table of Contents

  1. Preventing Loss of Data
  2. Preventing Report Memory Growth
  3. Choosing a Report Format for Large Reports
  4. Rearchitecting Sequences to Generate Multiple Smaller Reports

1. Preventing Loss of Data

In order to ensure that test data is not lost due to a memory error, enable the On-The-Fly Reporting option, located in the Contents tab of the Report Options dialog. With this option, TestStand will write the report to file as it is generated. Refer to TestStand Help: Report Options Dialog Box for more information.

Back to Top

2. Preventing Report Memory Growth

Even with On-The-Fly Reporting, you will still be storing results in memory which will eventually cause the TestStand Process to run out of memory. For this reason, enable the following settings to prevent this growth:

  • Conserve Memory and Only Display Latest Results (renamed "Only Display Latest Results" in TestStand 2012) option,  located on the Contents tab of the Report Options dialog.  This option configures the report view to only display the newest results, rather than the entire report.

    Note:
    in TestStand 2010 SP1 and previous, this option is only available with the HTML and ASCII report formats.
  • Discard Results or Disable Results When Not Required by Model, found by navigating to Configure»Model Options. With this option, TestStand deletes result data (stored in the ResultList array) once they have been added to the report. This option only works in On-the-fly reporting is enabled. (see Model Options Dialog Box for more info). 

It is important to note that both of these options must be enabled in order to prevent memory growth.

Back to Top

3. Choosing a Report Format for Large Reports

Note: TestStand 2012 includes many improvements to the XML and ATML formats, so the below recommendation applies only to users of TestStand 2010 SP1 and previous.

If you are currently using XML or ATML reporting, consider moving to HTML format. This is beneficial for a few reasons:

  • HTML report files have a smaller footprint than XML report files
  • In TestStand 2010 SP1 and previous, XML does not support the Conserve Memory and Only Display Latest Results option, which prevents report memory growth
  • XML reporting requires a contiguous block of memory large enough to hold the entire report (due to the fact that we are using the getXML() method to generate the report, which returns a string parameter containing the entire report body when it is called)

Back to Top

4. Rearchitecting 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. Use the following settings to call the sub-test in a new execution using the Single Pass entry point..
  3. Ensure that the calling sequence waits for the subsequence to finish before continuing execution:


    Note: Use a wait step after the sequence step and set this option to Do Not Wait if you need information about the subsequence, as mentioned in the dialog above

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit