TestStand 2017 Help
»View Product Info
Download Help (Windows Only)
You must complete the following tasks to add additional data to a report:
- Configure the desired property to be logged as a result. Results are stored in the Locals.ResultList array.
- Configure the result to be added to the report. This is typically accomplished by enabling the \IncludeInReport\ flag.
This example demonstrates the following approaches for adding custom data to a report:
- Using the UUT.AddtionalData container to add data to the report header
- Using the API method Execution.AddExtraResult
- Creating a custom property and setting the IncludeInReport flag
- Creating a custom step type with custom properties in the Step.Result container
- Using the Additional Results step type or property setting
Example File Location
<TestStand Public>\Examples\Customizing Result Processing\Adding Custom Data To a Report\Adding Custom Data To a Report.seq
How to Use This Example
Complete the following steps to run the example:
- Select Execute»Single Pass to execute the sequence.
- As the example executes, read the message popups for information about each method demonstrated.
Complete the following steps to review the sequences and steps in this example.
- Select the PreUUT Callback in the sequences pane. Note that the statement steps create new properties in the Parameters.UUT.AdditionalData container, which will appear in the report header. The PropertyObject.SetFlags method is used to configure the property to display in the report.
- Select the AddExtraResult sequence. This sequence calls the Execution.AddExtraResult method to add the Step.MessageExpr property to the Result list. For the property to appear in the report, the IncludeInReport flag must be enabled for this property.
- Select the CustomProperty sequence. This sequence uses the PropertyObject.SetValString method to create a new property in a Numeric Limit Test step. The sequence then calls PropertyObject.SetFlags to enable the IncludeInReport flag for the new property so that it is displayed in the report.
- Select the CustomStepType sequence. This sequence calls a step type which has an additional property in the results container. The IncludeInReport flag for this property is enabled in the step type definition, so you do not need to enable it for each instance of the type.
- Select the AdditionalResults sequence. This sequence uses the Additional Results step to log additional data to the report. It also uses the Log option for parameters in the Calculate Area of Circle code module to log the parameter values