beautypg.com

Wait for event, Wait for event activity overview – MTS Multipurpose Elite User Manual

Page 413

background image

Wait for Event

Wait for Event Activity Overview

Wait for Event Activity Icon

Use the Wait for Event activity to indicate when the test flow should wait for a condition to be true. The
Wait for Event is a blocking activity that ends when the condition is met, allowing activities after it to
execute.

The condition you define is an expression that uses the variables, functions, and operators available in
the Calculation Editor window. For example, to wait until the controller is in a run state, the wait condition
could be the following:

Signal(“Run/Stop”)==1

Use the Input Variables activity to prompt a user to provide a simple value.

Use the Calculate Variables selection to evaluate existing calculations.

Example: Using Wait for Event to Cancel Out of a Procedure

This example describes how to use a Wait for Event activity and a Set Variable Button control to stop
a procedure when a particular condition occurs.

1. Set up a parallel control activity in your procedure.

a) Add a Parallel Path activity to your test procedure.
b) Enter Cyclic Test as the display name for the parallel path.
c) Add a Cycle activity to the left side of the parallel activity and enter Cycle Part as the display name.
d) Enter 200 in the Number of Cycles box.
e) On the right branch of the parallel structure, enter Cancel as the display name.
f) Click the name of the parallel path and click Cancel as the controlling path.

2. Enter a variable.

a) Click the Variables tab and click New Variable.
b) For this example, enter the following variable:

ControlParallelPath

3. Set up a Wait for Event activity in the test procedure.

a) Add the Wait for Event activity to the right side of the parallel path.
b) Enter a name for the Wait for Event activity.
c) Click the ellipsis button to open the Calculation Editor.
d) Select the new variable from the Variable list and add it to the Calculation panel.
e) Enter a condition.

In this example, a new variable was added with a condition:

MTS TestSuite | 413

Test Activities