You configure Data Sources on the Data Sources page:
Each data source has properties. They correspond to data source columns and provide access to the data source’s data.
Configure Data Sources
-
Switch to the Data Sources page of the virtual service editor. Click on the page toolbar and specify the data source name in the subsequent dialog box. You will use this name to refer to a data source:
-
Select the data source type and specify connection settings:
The connection settings are common across ReadyAPI tools. For detailed information, see Data Source Reference.
-
Create properties for the data source. The properties provide access to the data source’s data. If your data source is based on an Excel sheet, on a database or a comma-separated value (CSV) file, the property names you enter must coincide with column names of the data source.
ReadyAPI automatically suggests importing property names from the data source after you finish configuring the connection settings. We recommend accepting this suggestion. If you decline it, you can import properties any time later by clicking the button or create properties manually by clicking on the property list toolbar:
We would like to remind that property names must coincide with the data source’s column names.
Tip: For REST service users: If the response body you defined contains a JSON object, you can create data source properties from this object – simply click in the Data Source section of the response editor. This will create data source properties whose names coincide with the property names of the object. You can add the properties to a new data source or to an existing one:
After you set up data source settings and created properties, you can use the properties in responses.
Configure Data Source Options
-
Select the data source you want to configure. Click to open the configuration dialog.
-
Set up the options:
-
Trim – Commands the data source to remove leading and trailing spaces from the retrieved text values.
-
Entitize – Commands the data source to replace special HTML symbols (like
&
or>
) with the appropriate entities (like&
or>
).
-