ReadyAPI includes a large set of standard and specialized assertion types that you can customize to suit any combination of API calls. You can create assertion chains, various scenarios and automated workflow.
You can use assertions to validate the message the test step receives. Usually, it compares some node of the request or response to the value you expect to get.
Each test step can use multiple assertions, so you can validate various aspects and content parts of the request or response.
After the execution of a test step, ReadyAPI applies all its assertions to the request or response. If any assertion fails, the test step will appear as
failed in the test case view. A corresponding
FAILED entry will appear in the test execution log.
ReadyAPI provides a complete solution for the verification process, allowing you to perform all the steps and testing them at the same time. This allows you to separate setup problems from execution, and derive operation results and stating issues. With this approach, you can easily perform the validation and find the origin of the problems.
There are several categories of assertions in ReadyAPI. During the run, only assertions available to a specific test step will be enabled.
In the Recently category, there are 5 assertions you have recently used. Some of these assertions may also be disabled due to the source and property restrictions.
To learn more about specific categories and assertions, see Assertions Reference.
The Assertions panel is similar in SoapUI, Secure and ServiceV.
The following screenshot depicts 3 assertions within a SOAP Request test step. The first two of them have passed correctly, and the last one has failed.
To add a new assertion, click .
The Add Assertion dialog appears.
Select an assertion category.
Select a specific assertion.
The assertion will appear on the list.
To configure the assertion, click .
For different assertions, the available settings may vary. To learn more about the specific assertion settings, see Assertions Reference.
To remove the assertion, click .
To change the order of assertions, use the arrow buttons.
The assertion order is important, since ReadyAPI runs them in the order you have specified, from the topmost to the bottom one.
To clone an assertion, click .
The Clone Assertions dialog appears.
Here, the following options are available:
A list of available assertions to clone.
A project to clone the assertion to.
A test suite to clone the assertion to.
A test case to clone the assertion to.
A list of available test steps to clone the assertion to.
Assertions of some types can be added several times to a test step, while assertions of some other types can be added only once. The Overwrite option affects cloning of such “one-instance” assertions:
The option does not affect multiple-instance assertions: ReadyAPI always adds copies of these assertions to the assertion list.
Removes any existing assertions with the same name.
Displays the list of updated test requests.
Specify the parameters you need, click Apply or OK to apply the changes, and close the dialog.