3.13.3. Do - While and While - Do loops
Prev | 3.13. Working with Conditional Statements and Loops | Next

### 3.13.3. Do - While and While - Do loops

These loops are executing the test cases in their Do Container as long as their While Condition is true. For Do - While loops the Do Container is executed first followed by the While Condition, for While - Do loops the other way around.

You can set a Do - While or While - Do loop to be negated in the Properties View of its top node (called "Do While" or "While Do" by default). A negated loop executes its Do Container as long as its While Condition is false.

To avoid infinite loops, all loops automatically stop after a set amount of runs. You can change this value in the Test --> Test Results Properties Page. The default value is 100. In case a (possibly) infinite loop is encountered, its corresponding Test Result Node is marked with an error marker. When executing tests using the testexec client, this value can be set by the -itermax command - line option.