Loops

Loops serve several needs in RVL:

  1. Iterate through Maps to make data-driven testing easier.
  2. Allows you to repeat a set of actions for a given number of iterations.
  3. Lets you repeat a loop body while some Condition is satisfied.

Loop Map

A Map allows both reading script data from the table defined in the same script or from external data source such as spreadsheet, file or database. Once a Map is defined, the loop is the simplest way of traversing it.

Flow Type Object Action ParamName ParamType ParamValue
Loop Map MapName
... ... ... ... ...
End

Where MapName should be name of the map declared earlier in the same script.

The loop goes through either the map rows or through the map columns depending on the type of map:

Loop Variable

Variable Loop

Flow Type Object Action ParamName ParamType ParamValue
Loop Variable VarName from number 1
Param to number 10
... ... ... ... ...
End

Where:

Loop Condition

Loop with Condition

Loop repeats while condition is satisfied (i.e. while(someCondition)).