Вы находитесь на странице: 1из 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/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
Validating SOAP Services
Tuesday, 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
Validating SOAP Services
Tuesday, 16 March 2010 11:04 - Last Updated Sunday, 30 May 2010 12:38

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

An
SOAP-specific
WSDL
make
will--overview
Schema
not and
sure
cause onassertions
how
Response
you are toXML
aCompliance
contained
failure). -work
-actually available:
with
-Schema assertions
-validates
-checks
checksvalidates
gettingthat the isisavailable
response at...;
message let’s have
against a quick
the look
adefinition at the
inuse
SOAP
Not Fault
SOAP
WS-Security Fault
WS-Addressing
response; checks
Status that
Response the-avalidates
that response
the
response
thethe response
response(ifaavailability
no
WS-Security
the isisassertions
SOAP a headers
notvalid
aFault
SOAP SOAP
of are
(for
and added
message,
negative
Fault
tokens
WS-Addressing connection
always
testing)
in the error
response
Headers inthis
the to

3/4
Validating SOAP Services
Tuesday, 16 March 2010 11:04 - Last Updated Sunday, 30 May 2010 12:38

and
Add- request
assertion
errorsJMS
TestSteps Timeout
validates
Status
occurred
assertions
to (see 
messages that
- ...)
a TestCase,
as when
-desired
when theusing
with response
usingaa
chaining
and
theyou JMS
JMSisendpoint,
received
endpoint
Of within
Property-Transfer
them
are all
asset.
desired that
this specifies
the specified
assertion
course
TestStep
and a add
response
time
validates
transferring
you(see 
can ...) (see 
channel
anythat
values no...)
number of this
JMS-related
between response
SOAP

4/4

Вам также может понравиться