Plugin Validating Soap Services

4
Validating SOAP Services Tuesday, 16 March 2010 11:04 - Last Updated Sunday, 30 May 2010 12:38 When creating a functional TestCase in soapUI, a very common scenario is that you want to call some SOAP/WSDL service and validate the response to check that the correct result is returned. This is easily done once you have imported the WSDL for the service you want to test:  1. Add a SOAP Request TestStep to a new or existing TestCase 2. Add Assertions to the TestStep that validate the response message Adding the Request TestStep can be done in several ways:  1. By pressing the “Add to TestCase” button on the top left of the message editor or the “Add to TestCase” action from the Request Popup Menu. This will prompt for which TestSuite/Te stCase to add to (or create new ones) and then open the following dialog: Here you can specify how the created SOAP Request TestStep should initially be 1 / 4

Transcript of Plugin Validating Soap Services

Page 1: Plugin Validating Soap Services

8/6/2019 Plugin Validating Soap Services

http://slidepdf.com/reader/full/plugin-validating-soap-services 1/4

Validating SOAP ServicesTuesday, 16 March 2010 11:04 - Last Updated Sunday, 30 May 2010 12:38

When creating a functional TestCase in soapUI, a very common scenario is that you want to call

some SOAP/WSDL service and validate the response to check that the correct result is

returned. This is easily done once you have imported the WSDL for the service you want to test:

 

1. Add a SOAP Request TestStep to a new or existing TestCase

2. Add Assertions to the TestStep that validate the response message

Adding the Request TestStep can be done in several ways:

 1. By pressing the “Add to TestCase” button on the top left of the message editor or the

“Add to TestCase” action from the Request Popup Menu. This will prompt for which

TestSuite/TestCase to add to (or create new ones) and then open the following dialog:

Here you can specify how the created SOAP Request TestStep should initially be

1 / 4

Page 2: Plugin Validating Soap Services

8/6/2019 Plugin Validating Soap Services

http://slidepdf.com/reader/full/plugin-validating-soap-services 2/4

Validating SOAP ServicesTuesday, 16 March 2010 11:04 - Last Updated Sunday, 30 May 2010 12:38

configured with assertions (see below).

2. By pressing the SOAP Request button or selecting the corresponding “Test Request”

from the popup Insert/Append TestStep menu options in the TestCase editor. This will first

prompt for a name and which operation in the project to test, leading to the following dialog:

Select the desired options and press OK

In either ways, pressing OK generates the SOAP Request TestStep as specified into the target

TestCase:

 

2 / 4

Page 3: Plugin Validating Soap Services

8/6/2019 Plugin Validating Soap Services

http://slidepdf.com/reader/full/plugin-validating-soap-services 3/4

Validating SOAP ServicesTuesday, 16 March 2010 11:04 - Last Updated Sunday, 30 May 2010 12:38

 Double-click it to open the editor which looks exactly like the standard SOAP Request editorapart from the Assertion and Log tabs added at the bottom: 

An overview on how to work with assertions is available at...; let’s have a quick look at theSOAP-specific assertions available:  - Schema Compliance - validates the response message against the definition in theWSDL and contained XML Schema  - SOAP Response - checks that the response is a valid SOAP message, always use this tomake sure you are actually getting a response (if no assertions are added a connection errorwill not cause a failure).  - SOAP Fault - checks that the response is a SOAP Fault (for negative testing)  - Not SOAP Fault - checks that the response is not a SOAP Fault - WS-Security Status - validates the WS-Security headers and tokens in the response - WS-Addressing Response - validates the availability of WS-Addressing Headers in theresponse;

3 / 4

Page 4: Plugin Validating Soap Services

8/6/2019 Plugin Validating Soap Services

http://slidepdf.com/reader/full/plugin-validating-soap-services 4/4

Validating SOAP ServicesTuesday, 16 March 2010 11:04 - Last Updated Sunday, 30 May 2010 12:38

  - JMS Timeout - when using a JMS endpoint that specifies a response channel thisassertion validates that the response is received within the specified time (see ...)- JMS Status - when using a JMS endpoint, this assertion validates that no JMS-relatederrors occurred (see ...)  Add assertions as desired and you are all set. Of course you can add any number of SOAPTestSteps to a TestCase, chaining them as desired and transferring values between responseand request messages with the Property-Transfer TestStep (see ...) 

4 / 4