8. Use the Query Wizard

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

To get the database data, you need to prepare the query. You can write it manually, or use a Query Builder Wizard . 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

    Click the image to enlarge it.

  2. The Build SQL Query wizard appears.

    ReadyAPI: The Build SQL Query wizard

    Click the image to enlarge it.

    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

    Click the image to enlarge it.

  6. Click OK.

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

ReadyAPI: The data source test step with the SQL query

Click the image to enlarge it.

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

ReadyAPI: Testing the data source test step

Click the image to enlarge it.

Now, you can use the new query in requests.

Prev          Next

See Also

Microsoft SQL Databases as Data Sources

Highlight search results