Before working with subreport data sinks, you need to create a data sink test step.
-
Open the ReadyAPI Data Source tutorial project.
-
Right-click the
DataSource Looptest step. -
Select Insert Step > DataSink.
-
Specify a name for the new step.
-
Click OK.
The new step will appear in the test case.
-
Double-click the data sink in the Navigator panel.
-
On a data sink page, select SubReport in the DataSink drop-down list.
-
Click
to add a new property for the data sink. -
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
CityNameproperty copies the value from the data source, theFormattedAddress,TypeandPlaceIDare copied from the response message, and Status is the script run result. -
To check if your data sink works correctly, switch to the test case page first.
-
Click
. -
After the test run finishes, switch back to the data sink page.
-
Check the output in the data log below. It should look like the output in the following screenshot:
See Also
Data-Driven Functional Tests Tutorial
Using the SubReport Data Sink


