3. Add DataSource to Virtual Service

Applies to ReadyAPI 3.7, last modified on April 08, 2021

Let’s now add a data source to our virtual service.

  1. In the virtual service editor, switch to the DataSources page. Click on the toolbar to create a new data source. In the subsequent dialog, select the data source name and click OK:

    Service virtualization and API testing: Creating a new data source

    By default, the new data source will have the Excel type:

    Service virtualization and API testing: Creating a new data source and selecting its type
  2. Click Browse and select the currency_converter_sample.xls file that you downloaded earlier to your computer.

  3. After you selected the file, ReadyAPI will suggest importing properties. In ReadyAPI terms, data source properties are names of the columns that the data source exports. So, ReadyAPI suggests importing column names from the Excel file. Click Yes.

    Service virtualization and API testing: Import properties message

    You will see the following dialog:

    Service virtualization and API testing: Import Properties dialog box

    Here, you can select the worksheet for importing column names and the cell of the first column. Keep the default values and click OK to continue.

    ReadyAPI will take the column names from the first row of the first worksheet it finds in the Excel file. You will see the property names on the DataSources page:

    Service virtualization and API testing: Creating a new data source and selecting its type

Now, we can include data into responses.

Prev          Next

See Also

Data-Driven Virtual Services – Tutorial

Highlight search results