8. Use the Query Wizard

To get the database data, you need to prepare the query. You can write it manually or use a Query Builder Wizard pro.png. For purposes of this tutorial, use the latter.

You can access the Query Builder in the data source test step window, below the SQL Query box.

  1. Click Use a wizard.

    ReadyAPI: Opening the Query Builder
  2. The Build SQL Query wizard appears.

    ReadyAPI: The Build SQL Query wizard

    Browse through the database to find the necessary data.

  3. Double-click to select Person > Tables > EmailAddress.

  4. Select the EmailAddress check box.

    The data you selected appears in different views.

  5. In the Alias column, input email – the name of the property in the data source test step.

    ReadyAPI: Finding the data in the SQL Query wizard
  6. Click OK.

The SQL Query you have created appears in the test step.

ReadyAPI: The data source test step with the SQL query

You can test the data source to make sure it retrieves the data you need. To do that, click run.png at the top of the test step editor and see the retrieved data in the Data Log:

ReadyAPI: Testing the data source test step

Now, you can use the new query in requests.

Prev Next

See Also

Publication date: