Inserting Images into a TestStand Report

Updated Aug 2, 2023

Environment

Software

  • TestStand

How can I insert images into a TestStand report?
This article explains how to insert images into a TestStand report.

You can insert images into a TestStand report by modifying the report file to contain the following HTML code wherever you want your images to appear:
<IMG ALT="My Picture" SRC="myimage.gif"></IMG> 

The myimage.gif text represents the image you want to see displayed in the report. You will need to replace this with the file name of your image. The My Picture text is an alternate text string that appears if the image is unavailable, if the user moves over the image with the mouse, or if the user has image loading turned off.

Note: You must save the picture in the directory in which you saved the sequence file. Also remember that because text files cannot have images embedded in them, the report must be in HTML format or XML format. If you are using an XML format, you must have the closing </IMG> tag. If you are using an HTML format, the closing </IMG> tag is optional.
 

Additional Information

The example in the Related Links below adds this HTML code in the Post-Expression of the step. The expression is:
Step.Result.ReportText = "<IMG ALT='My Picture' SRC='myimage.gif'></IMG>"

Notes: 
  • You must use the single quotes in this expression because the HTML code is inside a string.
  • When inserting images into a PDF report, ensure to include the full path of the image.
The image below shows the expression to insert the image from the example: