4. Run the Test

Applies to ReadyAPI 3.9, last modified on July 29, 2021

Once everything is in place, the test is ready to run.

You have a test case with a data source, a test step that uses this source, and a data source loop executed during the test run.

ReadyAPI: The REST Request test case

Click the image to enlarge it.

You can run the test case now. Click on the test case toolbar to do that.

To see the details of the test run, take a look at the Transaction Log. To open the log, click Transaction Log on the test case toolbar.

ReadyAPI: The test run in progress

Click the image to enlarge it.

The Transaction Log shows the following test run details:

ReadyAPI: The transaction log

Click the image to enlarge it.

You did not use any assertions to validate requests, so the assertion status for the request is [UNKNOWN]. You can see it in the Status column. The data source and the data source loop are always Passed, since it is impossible to assert them.

To check the response for a particular request made during the run, click Open in the respective row:

ReadyAPI: Check the response

Click the image to enlarge it.

Add an assertion

Let’s add an assertion to verify the server response.

  1. Open the Request 1 test step and click Add Assertion:

    Functional API testing: Add Assertion button

    Click the image to enlarge it.

  2. Select the Property Content > JsonPath Match assertion. To quickly find the required assertion, start typing its name in the Search field:

    Functional API testing: Add an assertion

    Click the image to enlarge it.

    ReadyAPI shows the Configure JSONPath Match Assertion dialog:

    Functional API testing: Configure JSONPath Match Assertion dialog

    Click the image to enlarge it.

  3. In the JSONPath Expression section, click and use the ensuing dialog to specify the $['results'][0]['address_components'][0]['long_name'] node.

    Functional API testing: Select JSON
  4. Right-click the Expected Result field and select Get Data from the context menu.

  5. In the Get Data dialog, select the test suite, test case, the Data Source test step and the Expected result property.

    Functional API testing: Select the data source property

    Click the image to enlarge it.

    Click Add.

  6. Click Save to create an assertion.

  7. You can find the added assertion in the Assertion panel:

    Functional API testing: Assertion panel

    Click the image to enlarge it.

  8. Open the test case and click again. After the test run finishes, examine the assertion statuses in the Transaction Log.

    Functional API testing: The transaction log

    Click the image to enlarge it.


See Also

Excel Files as Data Sources

Highlight search results