DataSource Loop Test Step

Applies to ReadyAPI 3.20, last modified on January 26, 2022

About step

Use the DataSource 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:

  • DataSource Step – The DataSource 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 DataSource 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 a ReadyAPI Test license. If you do not have it, you can request it on our web site or start a trial.

Editing DataSource Loop test step

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:

DataSource Step

Specifies the Data Source test step, from which the DataSource Loop test step will retrieve data.

Target Step

Specifies the test step from which the loop starts execution.

Discard PASS Results within Loop

Specifies whether ReadyAPI should discard all successful request results to use less memory in your tests. These results appear under each request’s record in the transaction log.

This option is identical to the Discard Successful Results test case option, but it affects only the steps inside the data source loop. If you need to review results for requests inside the loop, we recommend using the Discard PASS Results within Loop option over the one available for the test case.

Tip: ReadyAPI determines whether the request has been successful by validating it using the assertions of Target Step. If the step does not include any assertions, ReadyAPI saves all run results.

You can set the default option value in Preferences > Default Test Case Options.

Both DataSource Step and Target Step specify the test steps that belong to the same test case, to which the DataSource Loop test step belongs.

Property list

Also, you can adjust the test step’s behavior by using its properties in the DataSourceLoop Properties tab.

Note: The DataSource Loop test step does not support custom properties.
Name Description

The test step’s name.


Text describing the test step.

DataSource Step

Shows the specified DataSource test step.

Target Step

Shows the specified Target test step.


Typically, you should put the DataSource Loop test step after the DataSource and Target test steps in your test case. That is, you have the following hierarchy:

  • DataSource
    • Target test step
  • DataSource Loop

The DataSource 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 DataSource Loop operation first transfers the data pointer to the next row, and only then runs the Target test step.

Calling loop for multiple test steps

Another example:

  • DataSource
    • Target test step
    • Property Transfer
  • DataSource Loop

This shows how to make the data source loop call multiple test steps. To do that:

  1. Put the target test step right after the DataSource test step.
  2. Position other test steps after the target test step and before the DataSource 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 DataSource Loop.

See Also

DataSource Test Step
Test Steps
Data-Driven Testing Tutorials

Watch the video
Highlight search results