Displaying Graphs in a Report

Description

This example demonstrates how to include an array from a step that calls a code module in the test report.

Example File Location

<TestStand Public>\Examples\Customizing Result Processing\Displaying Graphs In a Report\Displaying Graphs In a Report.seq

Highlighted Features

Custom step types

Major API

None

Prerequisites

None

How to Use This Example

To execute the sequence, select Execute»Single pass.

The Methods of Logging Array Data section of the MainSequence demonstrates the following two approaches for adding array data to the report:

  • Log Array using Custom Action Step is an instance of a custom step type that specifies the custom property Step.Result.ResultArray. The Custom Action Step calls a code module that generates an array and writes it to Step.Result.ResultArray. TestStand step types set the IncludeInReport property flag on a subset of their result properties to specify that these properties automatically appear in the report. The IncludeInReport flag has been enabled for the Step.Result.ResultArray property so that TestStand automatically adds the values of ResultArray to the report during report generation.
  • Log Array using Additional Results uses the Log field to specify that a parameter should be in the report. This field is configured in the Parameters pane, located in the module tab of the step settings pane. The log field allows you to easily log data with no further customization.

You can customize how TestStand displays the array in the report with the Include Arrays option on the Contents tab of the Report Options dialog box. TestStand can insert arrays as tables or graphs. In this example, the ReportOptions callback sets arrays to display as graphs.

In the Using Graph Attributes section of the example, you can customize the graph of an array by using the attributes of the array property, Locals.OutputData. To view or edit the attributes of a property, right click the property, then select Advanced»Edit Attributes . To customize the appearance of a graph, use the DataLayout and DataOrientation attributes, as described in the Displaying Array Data as Graphs help topic.

Review the comments for the Set Graph Attributes and Log steps for more information about the graph behavior for each value of the DataLayout and DataOrientation attributes.