When SOAPUI creates a functional testcase a very common scenario is that you want some SOAP/WSDL service validation response checks to return the correct results. Once you have imported the WSDL service you want to test, it's easy to do so:
- add a new SOAP request Teststep or from an existing testcase.
-
add request Teststep can be in several ways:
- press the "Add to TestCase" button. This will prompt testsuite/testcase to add (or create a new), and then open the following dialog box:
Here you can specify how to create a SOAP request Teststep that was originally configured with assertions (see below).
- Insert/Add teststep by pressing the SOAP request button or by selecting the appropriate "Test Request" in the pop-up menu. This will first prompt a name and project to test the action, resulting in the following dialog box:
Select the desired option and press OK.
Either way, press the OK key to generate the SOAP request Teststep specified to the target testcase:
double click to open edit this looks exactly like the standard SOAP request editor except for the bottom of the assertion and added Log tab:
Overview of how assertions can be used in ..., we have a quick tour of available soap-specific assertions:
- Mode compliance --Validates the response message defined in the WSDL and XML schemas.
- SOAP response --Check that the response is a valid SOAP message
- SOAP Fault --Check that the response is a SOAP fault (negative test).
- not a SOAP fault --Check that the response is not a SOAP fault.
- the status of Ws-security --Verify the tokens in the ws-security header and in the response.
- ws-addressing response --Verify the response of the ws-addressing header for availability :
- JMS timeout   --receive a response within the specified time when using the JMS endpoint to specify the channel response for this assertion validation.
- JMS status   --when using a JMS endpoint, this assertion verifies that a JMS related error occurred), without a default value.
Verifying the SOAP Service