Creating a Data Sink

Applies to ReadyAPI 3.56, last modified on November 21, 2024

Before working with subreport data sinks, you need to create a data sink test step.

  1. Open the ReadyAPI Data Source tutorial project.

  2. Right-click the Data Source Loop test step.

  3. Select Insert Step > Data Sink.

  4. Specify a name for the new step.

  5. Click OK.

    The new step will appear in the test case.

    ReadyAPI: The data sink test step in a test case

    Click the image to enlarge it.

  6. Double-click the data sink in the Navigator panel.

  7. On a data sink page, select SubReport in the Data Sink drop-down list.

  8. Click to add a new property for the data sink.

  9. Set up its properties as follows:

    Property Value
    CityName ${DataSource#City}
    FormattedAddress ${Geocode search#Response#//GeocodeResponse[1]/result[1]/formatted_address[1]}
    Type ${Geocode search#Response#//GeocodeResponse[1]/result[1]/type[1]}
    PlaceID ${Geocode search#Response#//GeocodeResponse[1]/result[1]/place_id[1]}
    Status ${=testRunner.results[testRunner.results.size()-1].status}

    As you can see, the CityName property copies the value from the data source, the FormattedAddress, Type and PlaceID are copied from the response message, and Status is the script run result.

  10. To check if your data sink works correctly, switch to the test case page first.

  11. Click .

  12. After the test run finishes, switch back to the data sink page.

  13. Check the output in the data log below. It should look like the output in the following screenshot:

    ReadyAPI: The data sink after the test run

    Click the image to enlarge it.

See Also

Data-Driven Functional Tests Tutorial
Using the SubReport Data Sink

Highlight search results