Soapui Tutorial
Soapui Tutorial
SoapUI is an open-source tool used for functional and non-functional testing, widely used
in WebServices testing. This is a brief tutorial that introduces the readers to the basic
features and usage of SoapUI. The tutorial will guide the users on how to utilize the tool in
WebService and other non-functional testing.
Audience
This tutorial has been prepared for beginners to help them understand how to use the
SOAPUI tool.
Prerequisites
As a reader of this tutorial, you should have a basic understanding of the client/server
environment, and knowledge of SOAP, WSDL, XML, and XML namespace.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish
any contents or a part of contents of this e-book in any manner without written consent of
the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at [email protected]
i
Table of Contents
About the Tutorial ....................................................................................................................................... i
Audience ..................................................................................................................................................... i
Prerequisites ............................................................................................................................................... i
2. SOAP ─ MESSAGES................................................................................................................. 2
5. SOAPUI ─ CAPABILITIES.......................................................................................................... 6
ii
9. SOAPUI ─ PROJECT .............................................................................................................. 26
Add a WSDL.............................................................................................................................................. 28
Response .................................................................................................................................................. 42
iii
16. SOAPUI ─ LOGS PANE .......................................................................................................... 54
iv
28. REST ─ WADL ....................................................................................................................... 88
POST ........................................................................................................................................................ 97
GET........................................................................................................................................................... 97
PUT .......................................................................................................................................................... 98
PATCH ...................................................................................................................................................... 98
DELETE ..................................................................................................................................................... 99
v
1. SOAP ─ Introduction
SOAP is the acronym for Simple Object Access Protocol. It is defined by World Wide Web
Consortium (W3C) at http://www.w3.org/TR/2000/NOTE-SOAP-20000508 as follows:
It enables client applications to easily connect to remote services and invoke remote
methods.
Although SOAP can be used in a variety of messaging systems and can be delivered via a
variety of transport protocols, the initial focus of SOAP is remote procedure calls transported
via HTTP. Other frameworks such as CORBA, DCOM, and Java RMI provide similar
functionality to SOAP, but SOAP messages are written entirely in XML and are therefore
uniquely platform- and language-independent.
1
2. SOAP ─ Messages
Envelope: Defines the start and the end of the message. It is a mandatory element.
Header: Contains any optional attributes of the message used in processing the
message, either at an intermediary point or at the ultimate end-point. It is an
optional element.
Body: Contains the XML data comprising the message being sent. It is a mandatory
element.
Fault: An optional Fault element that provides information about errors that occur
while processing the message.
All these elements are declared in the default namespace for the SOAP envelope:
http://www.w3.org/2001/12/soap-envelope
The default namespace for SOAP encoding and data types is:
http://www.w3.org/2001/12/soap-encoding
Note: All these specifications are subject to change. Thus, keep updating yourself with the
latest specifications available on the W3 website.
<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://www.w3.org/2001/12/soap-envelope"
SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<SOAP-ENV:Header>
...
...
</SOAP-ENV:Header>
<SOAP-ENV:Body>
...
...
<SOAP-ENV:Fault>
2
...
...
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP_ENV:Envelope>
3
3. SOAP ─ What is REST?
It makes the use of standard HTTP methods, such as GET, POST, PUT, DELETE.
World Wide Web itself, based on HTTP, can be viewed as REST based architecture.
REST services are Platform and Language independent. Since it is based on HTTP standards,
it can easily work in the presence of firewalls. Like WebServices, REST doesn’t offer any in-
built security, session management, QoS guarantee but these can be added by building on
top of HTTP. For encryption, REST can be used on top of HTTPS.
4
4. SoapUI ─ Introduction
SoapUI is a tool which can be used for both functional and non-functional testing. It is not
limited to web services, though it is the de-facto tool used in web services testing.
It enables the users to create functional and non-functional tests quickly and in an
efficient manner using a single environment.
It is licensed under the terms of the GNU Leaser General Public Licence (LGPL).
It supports all the standard protocols and technologies to test all kinds of APIs.
SOAP UI can be used to test complete RESTful API and SOAP Web Service testing. It
supports Functional Testing, Performance Testing, Interoperability Testing, Regression
Testing, Load Testing, and much more.
It is user friendly as well as it is easy to convert functional test into non-functional tests
such as Load, Stress testing.
5
5. SoapUI ─ Capabilities
Functional Testing
Security Testing
Load Testing
Protocols and Technologies
Integration with other tools
Functional Testing
SOAP UI allows the testers to write functional API tests in SOAP UI.
SOAP UI supports debugging of tests and allows testers to develop data driven
tests.
SOAP UI supports multiple environments making it easy to switch among QA, Dev,
and Prod environments.
SOAP UI allows advanced scripting (the tester can develop their custom code
depending on the scenarios).
Security Testing
SOAP UI performs a complete set of vulnerability scan.
SOAP UI scans for cross-site scripting, which occurs when service parameters are
exposed in messages.
SOAP UI performs fuzzing scan and boundary scan to avoid erratic behavior of the
services.
Load Testing
SOAP UI distributes the load tests across n number of LoadUI agents.
SOAP UI simulates high volume and real-world load testing with ease.
SOAP UI allows advanced custom reporting to capture performance parameters.
6
SOAP UI allows end-to-end system performance monitoring.
7
6. SoapUI ─ NG Pro
SOAP UI is an open source free version tool with basic features of testing, while
SOAP UI NG Pro is a commercialized tool having advanced features of reporting, data-
driven functionality and much more.
Comparison
The following table compares and contrasts the various features of SoapUI and
SoapUI NG Pro.
8
Message Recording Coverage No Yes
9
7. SoapUI ─ Installation & Configuration
SoapUI is a cross-platform tool. It supports Windows, Linux, and Mac operating systems.
Prerequisites
Processor: 1GHz or higher 32-bit or 64-bit processor.
RAM: 512MB of RAM.
Hard Disk Space: Minimum 200MB of hard disk space for installation.
Operating System Version: Windows XP or later, MAC OS 10.4 or later.
JAVA: JAVA 6 or later.
Download Process
Step 1: Go to https://www.soapui.org/ and click Download SOAP UI.
10
Step 2: Click ‘Get It’ to download SOAP UI Open Source. It will start downloading 112MB
.exe file in the system. Wait till the download process is complete.
11
End of ebook preview
12