Branching Statements
Note:
Once a test step is added as any of the control statements, it is not allowed to change into another keyword.
In manual view
In script view
The Script view of test cases allows you to programmatically define and handle Break , Continue and Return , using either Groovy or Java language.
For example:
- Break :
for (int i = 0; i < max; i++) { // interested only in p's if (searchMe.charAt(i) != 'p') { break; } // process p's numPs++; }
- Continue :
for (int i = 0; i < max; i++) { // interested only in p's if (searchMe.charAt(i) != 'p') { continue; } // process p's numPs++; }
- Return :
for (int i = 0; i < max; i++) { // interested only in p's if (searchMe.charAt(i) != 'p') { return true; } // process p's numPs++; }