Adding Custom Images to a Report

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Purpose

This example is identical to the computer.seq example included in the <TestStand Public>\Examples\Demo directory except that it demonstrates how to modify the report of any failed diagnostic test steps to include HTML hyperlinks. When you are using an HTML-compatible report viewer, scroll down in the report to view any failed tests.

Note  You can enable report generation in the ReportOptions callback.

Example File Location


Open Example

<TestStand Public>\Examples\Customizing Result Processing\Adding Custom Images To a Report\Adding Custom Images To a Report.seq

Highlighted Features

Generating a test report

Major API

None

Prerequisites

None

How to Use This Example

Note Note  Before you run this example, click the Toggle Analyze File Before Executing button on the Sequence Analyzer toolbar to specify that you do not want the TestStand Sequence Analyzer to analyze the sequence file before TestStand executes the sequence. If you leave sequence analysis enabled and you run the sequence, TestStand returns an error because the sequence file generates some variables dynamically at run time. If you do encounter this error, you can select the Continue Execution option to continue sequence execution.

Complete the following steps to use this example.

  1. Select Execute»Single Pass to run the sequence. TestStand launches the Test Simulator dialog box, in which you select a computer motherboard test that you want to fail.
  2. Select at least one test to fail and click Done. After execution completes, TestStand displays the report on the Report pane.
  3. Review the report. The Failure Section of the report lists the steps that failed and, for each failed step, includes an HTML hyperlink that links to the section of the report with more information about the step.
  4. Close the Report pane.
  5. In the Sequence File window, select the second If step.

    The If Condition edit tab specifies an expression that determines whether any test in the sequence failed. If a test failed, the sequence checks the status of each test and calls computer.dll, located in the <TestStand Public>\Examples\Customizing Result Processing\Adding Custom Images To a Report\HTMLDiagnosticLinks directory, to determine what information to add to the report. TestStand passes value by reference so the DLL can update the report.

This example uses a DLL to maintain modular and reusable code, but you can also configure each step that fails to add HTML content directly to the report.

WAS THIS ARTICLE HELPFUL?

Not Helpful