9. Add the Data Source Loop

Applies to ReadyAPI 3.9, last modified on July 29, 2021

To have the test case repeat the test step for all the data, you need to make sure it loops at least once.

For now, you have a test case with a request, which uses the JDBC data source through a property expansion.

ReadyAPI: The request test step

Click the image to enlarge it.

At this point, you will not get results after running the request.

ReadyAPI: Running the request with no result

Click the image to enlarge it.

This happens, because the request did not fetch data from the source. To solve that problem, you need to add a data source loop which runs at least once.

  1. Double-click the test case in the navigator to open it. The Test Steps tab shows the test steps in the test case.

    ReadyAPI: Test steps in the test case

    Click the image to enlarge it.

  2. Click

  3. Enter a name for the loop.

    ReadyAPI: Naming the loop
  4. Click OK.

  5. The data source loop will appear in the test case.

    ReadyAPI: Test steps in the test case

    Click the image to enlarge it.

    The Data Source Loop test step will not work if placed before the request within the test case, so make sure to place it after the request.

    Now, you need to configure it with the correct data source, and the request to use that source.

    Double-click the data source loop.

  6. Select DataSource in the DataSource Step drop-down list.

    Select Request 1 in the Target Step drop-down list.

    ReadyAPI: Configuring the data source loop

    Click OK.

  7. The loop updates.

    ReadyAPI: The configured data source loop

    Click the image to enlarge it.

  8. Now, you can run the test case. Click .

    ReadyAPI: Running the test case

    Click the image to enlarge it.

Requests’ results are available in the Transaction Log.

ReadyAPI: The transaction log

Click the image to enlarge it.

Note: You can now also run the Request step, since the loop tells ReadyAPI where to get the data and use it.

In this tutorial, you have learned how to read data from an MS SQL Express database and use the jTDS driver and dll. This approach is similar for full MS SQL databases and other drivers.

Prev

See Also

Microsoft SQL Databases as Data Sources

Highlight search results