How to Include Execution Time of Each Step in TestStand Report?

Updated Oct 28, 2024

Environment

Software

  • TestStand

Execution time is one of the important pieces of information in a report. Knowing the execution time for each test performed helps to determine which step could be further improved to achieve maximum productivity and is also helpful to determine if the step misbehaved and modification is needed.

This article will focus on how to include the execution time for each step in the TestStand report.

  1. Launch TestStand.
  2. Select the step(s) you want to log its execution time.
    • Use <Ctrl-A> to select all steps.
    • To select a range of consecutive steps, click the first step in the section you want to select to highlight it and hold down <Shift> and click the last step.
    • Use <Ctrl-Click> to select multiple steps individually.
  3. Go to Step Settings>>Properties>>Additional Results.
  4. Click Add Custom Result2023-06-25_12h02_08.png
  5. After clicking Add Custom Result, a new row will appear in the Additional Result section. Insert a name for the additional result. For this demonstration, Execution_Time will be used as the name of the additional result. It should look like the image below: image.png
  6. Insert the following TestStand API as value for Value to Log
    Locals.ResultList[RunState.StepIndex].TS.TotalTime

At this point, your sequence file should look like below: 
image.png

On upcoming report generation, the execution time for each step will be included in the report just like the following illustration:
image.png