< Previous | Next >

Lesson 3.4: Add loop to the test

Now that your test script is ready and it works with one of the data pool entries, you will add a loop to the test so that the test is repeated and fetches all of the values in the data pool.
Because you have three operators in the data pool, the loop must iterate thrice.
  1. In the test editor, click Launch application: Calculator 1.0.
  2. Click Insert > Loop. To confirm adding a loop, click Yes.
  3. In the test editor, click Loop and in Loop name, type CalcLoop.
  4. In the Duration area, ensure Count-based is selected and for iterations type 3.
  5. To save the changes, click File > Save.
  6. In the test editor, click Run Test. The test starts running by including all the test elements such as data pool, substitutions, and loop.
Your test script will look like this.
Test editor with loop
At the end of the run, three tabs, namely Test Log, Mobile and Web UI Report (live report), and Statistical report are displayed.
Note: The Statistical report and Test Log are available only with Rational® Test Workbench Eclipse Client.

Lesson checkpoint

You added a loop to the test so that the test runs thrice.
< Previous | Next >

Feedback