Boolean variables overview – MTS Multipurpose Elite User Manual
Page 171
5. In the Properties panel for the Assign Variables activity, click the green + sign to add the variable to
the activity.
6. Select the variable on the Variable List and click the yellow … button to define a calculation. In this
example, add the Signal("_Load") function. This function will capture and save the load signal value
when the Assign Variables activity is executed.
Signal Function Using the _Load Argument
When you are finished, the Assign Variables activity will look like the following:
Assign Variables Properties
Boolean Variables Overview
A boolean value represents whether or not a condition is true. A boolean variable holds only one of two
values: True or False. Boolean values are the result of comparisons made in a program. For example, the
following code tests whether the value of variable a is equal to the number 5. If so, the result of the
comparison is the boolean value true. If a is not equal to 5, the result of the comparison is false.
a == 5
Boolean values are typically used in Test Flow Control test activities, such as the If-Else Condition activity.
The If-Else condition performs one action if a boolean value is true and another action of the value is false.
Typically, a comparison is combined with the statement that uses the comparison. For example, the
following code checks whether a equals 5. If so, it adds 1 to b; otherwise, it adds 1 to a.
if (a == 5)
b = b + 1
else
a = a + 1
MTS TestSuite | 171
Working with Variables