On-The-Fly Reporting and Logging in TestStand

Updated Jan 11, 2019

Reported In


  • TestStand

Issue Details

I do not want to log my report information at the end of the sequence. Is there a way to do on-the-fly reporting and logging in TestStand?


The ability to log test results concurrently with an execution is a feature included in TestStand. By default, all versions of TestStand will wait until an execution is complete before logging all results to a database or writing the UUT report file to disk. 

The Report Options dialog box can be found by clicking on Configure>>Result Processing... In the Result Processing window click on the hammer and wrench icon in the Report line to open the Report Options dialog box.

You then check the box labelled On-The-Fly Reporting. This selection is highlighted for the Report Generation in Figure 1 and for Database Logging in Figure 2.
Figure 1: On-The-Fly Reporting Option for Report Generation
Figure 2: On-The-Fly Reporting Option for Database Logging

Both on-the-fly reporting and logging can be customized by using the Discard Results or Disable Results When Not Required By Model options on the Model Options dialog box, which will instruct TestStand to conserve memory by discarding results after reporting each result. In this way you can optimize the memory consumed by TestStand for each execution.

Additional Information

When you use on-the-fly reporting, you can select the Report tab in the Execution window to view the test report during the execution. If the Report tab is the active view of the Execution window while a sequence is executing, the test report will periodically update as step results are processed. In addition to generating the test report concurrently with execution, the on-the-fly Report Generator periodically persists the current test report to a temporary file.

When you use on-the-fly database logging, you can use the Database Viewer application to view the data in the database tables while the sequence is executing. Note that if you use this feature with a schema that uses either stored procedure or command statements that do not use the INSERT command, you cannot define constraints for foreign keys in step result statements that references primary keys in UUT results.

For older versions of TestStand, the method is described below:

TestStand 2.0.x and TestStand 1.0.x:

For users of TestStand versions earlier than 3.0, there are shipping examples and the online example programs database with implementations of how to handle on-the-fly reporting and logging to databases on separate threads. Shipping examples are located in the <TestStand>\Examples directory. Refer to the Related Links section for example programs. These solutions can work in a TestStand 3.0 environment, but it is recommended that the built-in solutions be used instead.

TestStand 3.0:

In TestStand 3.0 there are checkboxes on both the Report Options dialog box and Database Options dialog box that allow you to enable/disable on-the-fly reporting and logging. On the Report Options dialog, the checkbox is labeled On-The-Fly Reporting. On the Database Options dialog, the checkbox is labeled Use On-The-Fly Logging.  Both of these reporting behaviors leverage callbacks at the process model level, using the ProcessModelPostResultListEntry and SequenceFilePostResultListEntry callbacks to process the step results. The final data logged is essentially identical to the data generated by the process model at the end of execution.