Applies to ReadyAPI 2.8, last modified on September 11, 2019

In SoapUI, you can apply assertions to various types of test steps. Depending on the test step type, there are different assertions available.

Prepare a test step

  1. Double-click the test step in the Navigator to open its editor.

  2. Run the request you are planning to assert at least once to get the response from the endpoint. To do that, click .

    Note: If you want to add the assertion for the SOAP VirtResponse test step, run the request you have associated with this virtual response.

Now, you can use the response data during the assertion creation.

Create assertions from the response

ReadyAPI provides a number of predefined assertions. Once you get the correct response, you can quickly add assertions for a later test. To add these assertions:

  1. Right-click the element you want to check in the Outline panel of the response editor.

  2. Select the desired assertion from the Add Assertion menu item.

    There are the following options:

    • for Content – checks whether the selected element contains the specified value.

    • for Count – checks whether the selected element appears the specified number of times.

    • for Existence – checks whether the selected element exists in the response.

    • for Content matching RegEx – checks whether the selected element matches the specified regular expression.

    • for Existence with Script – checks whether the selected element exists in the response by using a Groovy script.

Open the Assertions panel

To open the Assertions panel, click Assertions at the bottom of the test step editor.

ReadyAPI: The Assertions panel in SoapUI

Click the image to enlarge it.

Related Topics of Interest

Assertion Coverage

Describes where you can find assertion coverage data and how to use it.

See Also

SoapUI
Verifying Results
Assertion Reference
Transferring Property Values

Highlight search results