Lesson 9: Adding a loop
You will add a loop to the test so that the test is repeated to fetch all of the values from the data pool. Because your dataset has three entries, the test must run at least three times.
About this task
Context for the current task
Procedure
To add a loop:
- In the Compound Test editor, select both the test scripts and click .
- To confirm adding a loop, click Yes.
- In the Compound Test editor, click Loop and in Loop name, type ProductLoop.
- In the Duration area, ensure Count-based is selected and for iterations type 3.
- To save the changes, click . The compound test is now under the loop.
- To run the test, click Run Compound Test. The compound test is run three times and takes the values from a row for each run.
Results
You have added the compound test in a loop that will run for three times. Each run will fetch one row from the data pool.