Handling repetition
Tests frequently perform the same steps repeatedly, often varying only the input data values, and expected responses. Sets of actions can be used to create control loops to enable such repetitive processing.
Control loops enable you to repeat sequences of actions until an expression, called the condition, evaluates to either true or false. TestArchitect supports two types of loops:
The sequence of action lines between the
repeat
action and its associateduntil
action is executed continuously. Theuntil
action line includes a condition to stop argument, which generally contains a Boolean expression. When theuntil
action is reached, the expression is evaluated. If found to be false, control is returned to the beginning of the sequence; if true, the loop is exited, with control flow continuing with the next action below the until.Notes:Because the condition is not examined until control has reached the bottom of the loop, allrepeat-until
sequences are executed at least once.This is also a loop with a sequence of actions contained between two loop boundary actions:
while
and endwhile
. In this case, the conditional expression is attached to the while action, in the argument condition to run. If true, execution continues with the sequence of steps below thewhile
; upon reaching theend while
, control returns to thewhile
, and the condition is evaluated again. If thewhile
condition evaluates to false, loop execution ends and control flow continues with the first action below the endwhile
.Notes:Because the condition is examined before any of the contained action lines are executed, it is possible that the enclosed sequence will not be executed at all. This is in contrast torepeat-until
.