In ReadyAPI, you use assertions to validate response and request contents. ReadyAPI includes dozen of various assertion types that help you validate different parts of requests and responses: response codes, header values, specific fields in JSON and XML response bodies, and so on. For any test step, you can add one or multiple assertions to check if it gets and returns data in expected format and functions correctly.
To create and configure assertions, you use the Assertions panel:
To create an assertion, click on the toolbar of the Assertions panel. This will invoke the Add Assertion dialog box:
In the dialog, select an assertion category, pick the assertion you need and click Add. The assertion will be added to the panel.
Note that some assertions can be disabled in the dialog, because they are not applicable to the currently selected test step. The Recently category of the dialog lists 5 recently used assertions.
Use the panel toolbar to configure assertions:
Select an assertion in the panel and click this button to configure the assertion settings. For more information on assertion properties, see Assertions Reference.
Select an assertion in the panel and click this command to delete the assertion.
Use them to change the position of an assertion in the panel.
The assertion order is important, since ReadyAPI runs them in the order you have specified, from the topmost to the bottom one.
The following image shows 3 assertions applied to the SOAP Request test step. The first two have passed correctly, and the last one has failed:
Invokes the Clone Assertion dialog, where you can copy an assertion (with all its settings and parameters) to another test step in the same or another test case or project. See Clone Assertions for details.
ReadyAPI organizes assertions into several categories. You can see them in the the Add Assertion dialog box. Some assertions validate response contents, some others check the structure of a message body, verify headers, and so on. To learn more about available assertions and their parameters, see Assertion Reference.