Also, we can find failed test steps in the test execution log. Create a new SOAP project by pressing CTRL N and follow the steps.
The sample test step assertion screen looks as below: In the above image, some of the test steps have FAILED and some of them have PASSED. As we discussed earlier, if the assert condition is not met with the expected results then the result is FAILED. For that, we can use Medicare Supplier web service that is available at Supplier.asmx? After creating the project, SOAPUI generates the list of interfaces and the corresponding requests. To add the test suite to this project follow these steps: Step 3.
In the Add Assertion window, click Property Content category and then click XPath match assertion.
As testers, it does not matter if we executed 1000 or even million test steps, but for us, the result comparison is what determines the outcome of a test.
Therefore, we will spend this entire article on understanding how we can do that with Soap UI, although web services can be asserted manually.
Each type of assertion targets specific validations on the response such as matching text, comparing XPATH or we could also write queries based on our need.
When the test steps get executed, then the associated assertions receive the response for the respective test steps.
Because we had already specified that the particular supplier data should be present in the service response in the expected result configuration and when the city name is invalid, that supplier is clearly not present.
This is how we can assert the XML response using XPath Match expression assertion.SOAPUI Assertions compare the parts/all of the response message to the expected outcome.We can add a variety of assertions provided by Soap UI to any test step.Run the request and check the results as well as the assertion status.We will get failure response and red status indication for the assertion.If we want to filter particular data from the whole response, we have to add the following script.//ns1: Supplier DataAs you know, if you execute the Get Supplier By City request, it will produce the response which contains the list of supplier’s personal data that belongs to New York City. Then SOAPUI generates the following result: Please refer this screenshot: Here in the response data, you can see only one supplier personal data.