TestStand 2019 Help
»View Product Info
Use a Wait step to wait for an execution or thread to complete or to wait for a time interval to elapse.
When the thread or execution completes, the Wait step copies the result status and error information for the thread or execution to the status and error properties of the Wait step. Therefore, when a Wait step waits on a sequence that fails, TestStand sets the status of the Wait step to Failed. The result list entry for a Wait step contains a TS.SequenceCall.ResultList property, which is the result list for the thread or execution.
In a Wait step, do not specify to wait on a Sequence Call step when the Sequence Call step launches more than one asynchronous call, such as in a loop, because the Wait step waits on only the last asynchronous call the Sequence Call step launches. To wait on multiple asynchronous calls you launch from a Sequence Call step in a loop, store an ActiveX reference to each thread or execution you launch and wait on each reference in a Wait step.
Configuring the Step
Use the Wait Settings edit tab in the TestStand Sequence Editor and the Wait Step Configuration dialog box in a TestStand User Interface to configure the Wait step.
In addition to the common custom properties, the Wait step type defines the following step properties:
- Step.Result.TimeoutOccurred—Exists only when you configure the step for the Wait for Thread or Wait for Execution operation. TestStand sets the value to True when the Wait for Thread or Wait for Execution operation times out.
||Note If you configure the step to use the Rendezvous operation programmatically using the Step.Operation property, you must also create the Step.Result.TimeoutOccurred property using the newProperty() method for the step to execute successfully.
- Step.TimeoutEnabled—The Timeout Enabled setting for the Wait for Thread or Wait for Execution operation.
- Step.TimeoutExpr—The Timeout expression, in seconds, for the Wait for Thread or Wait for Execution operation.
- Step.ErrorOnTimeout—The Timeout Causes Run-Time Error setting for the Wait for Thread or Wait for Execution operation.
- Step.ThreadRefExpr—The Thread Reference expression for the Wait for Thread operation when the Step.SpecifyBySeqCall property is False.
- Step.SeqCallName—The name of the Sequence Call step that creates the thread or execution the step waits for when the Step.SpecifyBySeqCall property is True.
- Step.SeqCallStepGroupIdx—The step group of the Sequence Call step that creates the thread or execution the step waits for when the Step.SpecifyBySeqCall property is True. The valid values are 0 = Setup, 1 = Main, and 2 = Cleanup.
- Step.WaitForTarget—A value that specifies the type of Wait operation the step performs. The valid values are 0 = Time Interval, 1 = Multiple, 2 = Thread, and 3 = Execution.
- Step.TimeExpr—The time expression for the Time Interval or Time Multiple operation of the step.
- Step.ExecutionRefExpr—The expression that specifies a reference to the execution on which the Wait for Execution operation waits.
- Step.SpecifyBySeqCall—The Specify By Sequence Call setting for the Wait for Thread or the Wait for Execution operation.
At run time, TestStand adds the following properties to the results for Wait steps you configure to wait for a thread or execution:
- AsyncMode—TestStand sets the value to True when the Wait step is waiting on a thread and to False when the Wait step is waiting on an execution.
- AsyncId—The value of the ID property of the thread or execution the step is waiting for.
Configuring Test Sockets to Wait for Notifications (Example)