How to Measure Time Difference of Step(s) in TestStand?

Updated Dec 25, 2024

Environment

Software

  • TestStand

Test time is an essential timing parameter in production. Knowing the test time will help the test engineer understand whether the current process is efficient and estimate whether the system is performing as expected. This article will guide you through measuring the time to complete a step by creating a new sequence file to determine the time taken for a Wait step to complete from scratch. A similar concept could be reused to measure the completion time of multiple steps.

  1. Launch TestStand
  2. Create a new sequence file by File>>New>>Sequence File
  3. Create a new local variable by right-click and select Insert Local>>Number
  4. The default name of the local variable is local. For this article's demonstration purpose, the local variable will be named as StartTime.
  5. Repeat Step 3 and Step 4 to create another local variable named EndTime.
  6. Insert a Wait into MainSequence and specify the wait time to be 3 seconds.
  7. Log both the start time and end time of the Wait step by using local variables at both pre-expression and post-expression, respectively.
    • Save the start time to StartTime local variable with the following expression at the pre-expression
      Locals.StartTime=Seconds() 
    • Save the end time to EndTime local variable with the following expression at the post-expression
      Locals.EndTime=Seconds() 

  8. Display the time difference by using a Message Popup with the Message Expression of Step Setting's Text and Button section to be as follows:
    Str(Locals.EndTime - Locals.StartTime)

  9. Run the sequence file and observe the message popup showing the Wait step took approximately 3 seconds to complete.