The Condition Designer dialog box helps you quickly define conditions that drive the outcome of decision, repetition, and verification test logic. Access the Condition Designer from the Test Logic Designer wizard or Logic Toolbox. After creating certain types of test logic, you can also access the Condition Designer from the Properties pane and edit the condition.
A condition defined using the Condition Designer consists of the following elements:
<Value 1> <Comparison Operator> <Value 2> = <Return Value>
5 > 4 = TRUE
The elements of a condition are defined as follows:
Value 1 and value 2 – The values of the condition serve as the input parameters that are compared against each other. Values in a condition can be a property of a control, a variable, an ActiveData asset, or a literal value.
Return value – When the two values are compared using the comparison operator, the return value of the condition is evaluated to either TRUE or FALSE.
Each type of test logic uses the return value of the condition to determine the resulting action to take. For decision and repetition logic, the action is to run a sequence of test steps. For verification logic, the action is to send a pass/fail message to the result of a visual test or, optionally, flag a specified test step.
If counterVar Is Equal to 12 Then Do step 2 to step 4 End If
Repeat While counterVar Is Equal to 12 Do step 2 To step 4 End Repeat
If counterVar Is Equal to 12 Then send pass message else send fail message End If
Additionally, you can create compound conditions using the logical operators AND or OR. For example, you can create the following compound decision logic condition:
If counterVar Is Equal to 12 AND textVar Is Equal to "Admin" Then Do step 2 to step 4 End If