Use the Data Source Loop test step to perform test actions in a loop using new data on each iteration.
To use this test step, you need to add the following test steps to your test case:
Data Source Step – The Data Source test step that will provide access to the data.
Target Step – The test step that will perform test actions. This can be one of test steps sending requests like SOAP Request or REST Request, or the Run Test Case test step that runs another test case of your project.
The Data Source Loop test step will iterate through data and call all test steps contained in the loop on each iteration.
To use this test step, you need ReadyAPI Test Licenses. If you do not have it, you can request it on our website or start a trial.
The test step has no editor. To modify its properties, simply double-click the test step in the project tree. This will invoke a dialog box with the following properties:
Both the Data Source Step and Target Step specify the test steps that belong to the same test case, to which the Data Source Loop test step belongs.
Also, you can adjust the test step’s behavior by using its properties in the Data Source Loop Properties tab.
Note
The Data Source Loop test step does not support custom properties.
DataSourceLoop Properties
Name | Description |
---|---|
Name | The test step’s name. |
Description | Text describing the test step. |
Data Source Step | Shows the specified Data Source test step. |
Target Step | Shows the specified Target test step. |
Typically, you should put the Data Source Loop test step after the Data Source and Target test steps in your test case. That is, you have the following hierarchy:
Data Source
Target test step
Data Source Loop
The Data Source test step loads data in the memory and sets the data pointer to the first row. Then, the Target test step performs the test actions using the first row. The Data Source Loop operation first transfers the data pointer to the next row, and only then runs the Target test step.
Another example:
Data Source
Target test step
Property Transfer
Data Source Loop
This shows how to make the data source loop call multiple test steps. To do that:
Put the target test step right after the Data Source test step.
Position other test steps after the target test step and before the Data Source Loop test step.
In this example, the Property Transfer will be executed once for each iteration, using the Target test step for each data row. In fact, it works as if you had multiple copies of the Target test step and the Property Transfer.
After the loop is over, ReadyAPI will continue with the test steps that are after the Data Source Loop.