in SOAPUI by
How To Add An Assertion To The Test?

1 Answer

0 votes

Open the request editor.

In the request editor, click the Add an Assertion to Test Request button.

Select Response SLA from the drop down in the Select Assertion dialog box.

In the Configure Response SLA Assertion dialog box, write 500 and click OK. This will validate that the response of the SLA is fewer than 500.

Now that you’ve added the assertion, you are going to run the request to validate the response. If all assertions are successful, the SOAP icon should turn green in three places .

You can also validate the response by adding an X-Path Match assertion.

In Soap UI Pro you can open the Select X-Path dialog, which lets you select nodes to assert using point-and-click. As a result Soap UI creates the matching X-Path expression that refers to the selected node.

Soap UI automatically populates the expected result to match what’s in the response. But of course, you can change this to what’s relevant for you.