Hurry! 20% Off Ends SoonRegister Now

SoapUI Tutorial

API Testing plays a significant aspect of almost every quality analyst in the software industry. There are various tools available for API automation in the market, and SoapUI is one of the top tools which has made API testing easy. It's a cross-platform API or Web Services testing tool that can do both functional and non-functional testing. This SoapUI tutorial gives you detailed knowledge of what SoapUI is and its features, architecture, installation, creating a SoapUI project, and much more.

SoapUI Tutorial

SoapUI Tutorial - Table of Content

What is SoapUI?

SOAP is the acronym for Simple Object Access Protocol. SoapUI is the world's most widely-used automation testing tool for soap and REST APIs. It's a lightweight protocol used for information exchange in a decentralized and distributed environment. You can do functional, load, security, and compliance tests on your API using SoapUI. 

It was developed by Eviware in 2005 and later acquired by Smartbear in 2011. It's a cross-platform desktop-based application that can run on any operating system.

If you want to enrich your career and become a professional in SoapUI, then visit Mindmajix - A leading online training platform: "SoapUI Training" This course will help you to achieve excellence in this domain.

Why use SoapUI?

SOAPUI allows testers to execute automated functional, compliance, regression, load tests, and more on different Web APP. Let's discuss the essential features of SoapUI:

#1. Functional Testing 

A powerful tool that allows testers to write functional API tests.

  • Provides user-defined scripts that can be customized as per user requirements.
  • Supports drag and drop feature to create and run complex test scenarios.
  • Supports multi-environment to switch between QA, Dev, and Prod Environments.
  • Allows advanced scripting

#2. Security Testing

Security testing plays an essential role in the authentication and authorization of web services and APIs. 

  • Performs complete vulnerability scans to protect the services.
  • Avoids SQL injection to secure the databases.
  • Scans and locates the huge documents within XML messages that cause stack overflows.
  • Scans for cross-site scripting, when specific parameters in structured messages are exposed.
  • Performs boundary scan and fuzzing scan to avoid erratic behavior of services. 

#3. Load Testing

In SoapUI, you can create advanced load tests easily on the base of existing functional API tests.

  • Distributed load tests across any number of loadUI agents 
  • Allows advanced custom reposting to capture performance parameters.
  • Supports end-to-end system performance monitoring

#4. Compliance Testing

Compliance testing includes source and data authentication license certificates and various service agreements for web service validation.

#5. Regression Testing

In SoapUI, regression testing is used to analyze bugs and malfunctions of web services. In the current release tools, it reverifies the new changes of the web services.

 MindMajix YouTube Channel

#6. SoapUI supported Protocols and Technologies.

SoapUI supports the following protocols:

  • SOAP – Simple Object Access Protocol
  • REST – Representational State Transfer
  • WSDL – Web Service Definition Language
  • AMF – Action Message Format
  • HTTPS – HyperText Transmission Protocol Secured
  • JDBC – Java Database Connectivity
  • HTTP – HyperText Transmission Protocol
  • JMS – Java Messaging Service

#7. SoapUI Integration with other tools

SoapUI integrated very well with popular tools:

  • Apache Maven Project is a project management tool that manages a project's build, reporting, and documentation from a central repository.
  • HUDSON is a Java-based tool integrated with SoapUI to find bugs quickly. 
  • JUnit is a unit testing framework built in Java that controls the flow of tests from SOAPUI
  • Apache - Ant is used to develop projects and run test suites using the command line in SoapUI Tools. 

Next up, in this SoapUI Tutorial, we will focus on SoapUI Architecture.

SoapUI Architecture

The following image shows the architecture of SoapUI:

Let's discuss the architecture of SoapUI in detail:

  • Test config files: These are the files that provide configurations related to testing data, expected results, data connection, variables, and any other environment setup or test-specific details.
  • Third-party API: They help in creating an optimized test automation framework. For example, the JExcel API allows integrating with MS Excel to create a data-driven framework.
  • Selenium: These are the Selenium Jars that use UI automation.
  • SoapUI Runner: It runs on the SoapUI project and is a handy utility for test automation as it supports you to run the test from the command line. Moreover, it acts as a trigger for test automation.
  • Properties: These are the test requested properties that contain any dynamically generated data. 
  • Groovy: This library enables SoapUI to provide its users with groovy as a scripting language.
  • Test Report: SoapUI supports a Junit style report and uses Jasper reporting utility to report test results.

Now in SoapUI Tutorial, we’ll learn about SoapUI Versions.

SoapUI Versions

The following tables show the SoapUI versions and release dates.

Version NameRelease DateRelease Notes
SoapUI 1.016/10/2005Initial Release
SoapUI 1.506/04/2006Load Testing Release
SoapUI 1.61/11/2006Tools Release
SoapUI 1.710/04/2007Mock/Pro Release
SoapUI 2.012/12/2007Coverage Release
SoapUI 2.518/11/2008REST Release
SoapUI 3.009/07/2009Reporting Release
SoapUI 3.501/03/2010Protocol Release
SoapUI 3.614/09/2010LoadUI Release
SoapUI 4.014/06/2011Security Release
SoapUI 4.528/03/2012Big Ears Release
SoapUI 5.202/07/2015Major New Features Release
SoapUI 5.305/12/2016Bundled Plugin Release
SoapUI 5.427/11/2017Open Source
SoapUI 5.512/02/2019Open Source
SoapUI 5.614/07/2020Open Source

SoapUI vs SoapUI Pro

SoapUI is an open-source, free version tool that offers basic features of testing. At the same time, SoapUI Pro is a commercialized version with advanced reporting features, data-driven functionality, and more.

Let's understand the difference between these two versions:

FeaturesSoapUISoapUI Pro
Supported Technologies  
Soap/WSDLYesYes
RESTYesYes
AMFYesYes
JMSYesYes
JDBCYesYes
HTTPYesYes
Reporting  
JUnit ReportsNoYes
Test Suite CoverageNoYes
Assertion CoverageNoYes
Test Case CoverageNoYes
Message Recording CoverageNoYes
WSDL HTML ReportYesYes
Report Data ExportNoYes
General Features  
Standalone ApplicationYesYes
Multi Environment SupportNoYes
Manual test stepsYesYes
Unit ReportingNoYes
Scripting LibrariesNoYes
Data Source Driven TestNoYes
Test RefactoringNoYes
Message AssertionYesYes
Request/Response Coverage NoYes
WSDL Coverage NoYes
Floating LicenceNoYes
Automation  
Load TestsNoYes
Functional TestsNoYes
Mock ServicesYesYes
Command LineYesYes
Code GenerationYesYes
CI and Build IntegrationYesYes
MavenYesYes

Next in SoapUI Tutorial, it’s time we understand the SoapUI Download and Installation.

SoapUI Download and Installation

SoapUI is a cross-platform application and can be used either on Windows, Mac, or Linux/Unix, according to the requirement and preferences. Let's discuss what the steps required to download, install and configure SoapUI on Windows are.

Prerequisite for SoapUI installation:

  • Processor − 1GHz or higher 32-bit processor.
  • Hard Disk Space − Minimum of 200MB.
  • RAM − 512MB of RAM
  • JAVA − JAVA 6 or later.
  • Operating System Version − Mac OS 10.4 or later, Windows XP or later.

Part A - Download

Step 1) Go to https://www.soapui.org/downloads/latest-release/ and choose the Download corresponding to your operating system.

SoapUI OpenSource Downloads

Step 2) Next, it redirects to https://www.soapui.org/downloads/thank-you-for-downloading-soapui/ page and starts downloading.

SoapUI Download

Part B - Installation

Step 1) After downloading the .exe file, execute it as shown below:

 SoapUI Installation

Step 2) In the setup wizard, click Next to continue.

setup wizard

Step 3) Choose the installation directory, and click on the Next button.

SoapUI Installation Directory

Step 4) Choose the components that you want to install.

Components

Step 5) Accept the license agreement and click on Next.

SoapUI License Agreement

Step 6) Choose the folder location for SoapUI Tutorials or else leave it as the default and then click on the Next button.

SoapUI Tutorials Location

Step 7) Choose the start menu folder or leave it as the default folder and click on Next.

SoapUI Menu Folder

Step 8) Enable the checkbox, create a desktop icon and click Next.

Desktop icon

Step 9) The Installation starts as shown below and then click on Finish.

SoapUI Setup Wizard

Step 10) It launches the SoapUI.

Launches the SoapUI

How to Create a SoapUI project?

It is simple to create a Soap project in the SoapUI tool. First, we need to import the Soap/REST protocol.

Step 1) Navigate to the File menu and select the New SOAP Project option, as shown below:

Step 2) Next, it opens the New SOAP Project window, as shown below:

New SoapUI Project

Step 3) Enter the WSDL Web URL in the Initial WSDL text box, and it automatically retrieves the project name.

WSDL Web URL

Step 4) After clicking on the OK button, it processes the WSDL URL for successful execution and displays the project calculator's various services and properties, as shown below.

 Project calculator's various services

Step 5) Expand the service of the project calculator by clicking on + symbol.

Project Calculator

If you want to create more than one Request, right-click on Add service and click on new request option as shown below:

SoapUI Add service

Step 6) Enter the 'intA' and 'intB' and click on the submit button. Response XML displays on the right-side pane.

Response XML

SoapUI Test Structure

The SoapUI test structure contains three major parts: Test Suite, TestCase, and TestSteps. The following diagram shows the flow diagram of the test structure used in the SoapUI testing tool.

SoapUI Test Structure

What is a Test Suite?

Test Suite is a collection of test cases used to group functional tests into logical units. Inside the test suite, you can create any number of tests to support large-scale test scenarios. Using the Test Suite in SoapUI, you can perform the regression, performance tests, etc. 

What is a Test Case?

A test case is a collection of test steps grouped to perform specific tests according to the required service.

What is a Test Step?

In SoapUI, Test Steps are the building blocks of functional tests. All test steps created inside the TestCase are used to control the execution flow and validate web service functionality.

How to create a TestSuite in SoapUI?

Follow the below steps to create a TestSuite in the SoapUI tool:

Step 1: A TestSuite can be made in two ways:

To create a new project in the SoapUI, add a TestSuite as shown below-

TestSuite in SoapUI

Choose the <create> option from the TestSuite dropdown menu and then click on the OK.

TestSuite Dropdown Menu

The created TestSuite is shown below:

Create TestSuite in SoapUI

Step 2: We can also create TestSuite for specific services in the project calculator as follows:

  • Right-click on a particular service of a calculator and choose the Generate TestSuite option
Generate TestSuite option
  • Next, click on, OK.
Generate Testsuite
  • A popup is displayed, click on OK, and it generates the TestSuite. 

How to create a TestCase in SoapUI tool?

Follow the below steps to add a TestCase:

  • Right-click on the TestSuite created in the navigation section and select the New TestCase.
  • A popup will be displayed, click on OK. It shows all the test cases.

How to create a TestStep in the SoapUI tool?

Follow the below steps to create a TestStep:

  1. Right-click on test steps and choose the appropriate TestStep service from the list. 
  2. Enter the step name and click on OK.
  3. Next, a dialog pops up to select the operation to invoke. After choosing the proper operation, click OK.
  4. A dialog box appears to create a TestStep and click on OK.
Frequently asked SoapUI Interview Questions

SoapUI Assertions

Assertions are the validation rules used to claim verification results and check whether the targeted web services work as expected. Assertions validate the messages received by TestStep during execution. SoapUI supports a wide range of assertions in response.

Following are the list of assertions supported by SoapUI:

AssertionDescription
1. Property Content 
ContainsSearches for the existence of specified strings. Also, it defines regular expressions.
Not ContainsSearches for the non-existence of specified strings. Also, it supports regular expressions.
XPath MatchSelects the specific content from the target property and matches the XPath expression's result with the expected value
XQuery MatchLike XPath Match, select the target source content and compare or match the XQuery expression’s result to the expected value.
ScriptingAllows the user to run a custom script for performing user-defined verification.
2. Compliance, Status, Standards 
HTTP Download All ResourceDownloads all resources related to HTTP and validates them.
Invalid HTTP Status CodesChecks the target TestStep receives an HTTP result with a status code, not in the list of defined codes.
Not Soap FaultChecks the last received message has no-fault.
Soap ResponseCheck the last received message is a valid Soap response.
Soap FaultChecks the last received message has a soap fault.
WS-SecurityChecks the last received message has a valid WS-Security header. 
Schema ComplianceValidates the last received XML message is in line with the WSDL or WADL compliance definition.
WS-Addressing RequestValidates the last submitted request has a correct WS addressing header or not.
WS-Addressing ResponseChecks the last received response XML message has the correct WS address header.
3. Script 
Script AssertionAllows users to create custom scripts that perform user-defined validation rules
4. Security 
Sensitive Information ExposureAuthenticates the received XML response messages without disclosing the sensitive information.
5. SLA 
Response SLAValidates whether the last received message’s response was within the defined time limit.
6. JMS 
JMS StatusValidates whether the JMS request of the targeted test phase is successfully executed.
JMS TimeoutVerifies that the JMS specified test steps' description did not take longer than the specified duration.
7. JDBC 
JDBC StatusChecks the defined TestSteps request executed successfully in a SoapUI testing tool.
JDBC TimeoutValidates that the specified test steps' JDBC statement did not take longer than the specified duration.

SoapUI Properties

The term properties represent the characteristics of a specific object. They are a central aspect of more advanced testing with SoapUI. 

SoapUI properties provide the ability to hold authentication details, making it easy to manage them in a central place of external files.

Types of SoapUI properties:

  1. Default Properties: These are the properties built in the SoapUI tool, or we can say when a new project is created in a SoapUI. 
  2. Custom / User Defined Properties: These are the properties defined at any project creation point like a global, test case, test steps, etc. 

Defining Properties

We can define SoapUI properties at multiple levels in a project:

  • Workspace Default Properties: For Workspace Default properties, select the Workspace in the Projects Navigator as shown below:
 Workspace Default properties
  • Project Default Properties: Select a Project in the Projects Navigator to create a project's default properties.
project default properties
  • Service Default Properties: Like mentioned above, select a Web Service in the Project Navigator to define service default properties.
  • Operation Properties: Select an Operation property of the Project to define the default properties of the operation.
  • Request Default Properties: Select a Web Request from the Operation Properties to define a Request Default property.
  • Global Properties in SoapUI: The global properties are used to define globally associated properties in the SoapUI tool. To define a global property, follow the steps shown below:

1. First, click on the Preferences tab presented in the toolbar

 toolbar

2. The below image appears after clicking on the preferences tab.

preferences tab

3. Next, select the Global Properties and click on the (+) icon to add global properties. 

Global Properties

Conclusion

SoapUI has become the defacto standard for testing APIs in today's service-oriented world because of its powerful and easy-to-use features. By incorporating SoapUI into testing, companies can improve the quality of software. Now, it's the right time for you to start your career in SoapUI, if you're interested. 

Do you have any questions regarding this 'SoapUI Tutorial'? If so, then please put it in the comments section below. Our experts will help you solve your queries at the earliest.

Job Support Program

Online Work Support for your on-job roles.

jobservice

Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:

  • Pay Per Hour
  • Pay Per Week
  • Monthly
Learn MoreGet Job Support
Course Schedule
NameDates
SoapUI TrainingDec 21 to Jan 05View Details
SoapUI TrainingDec 24 to Jan 08View Details
SoapUI TrainingDec 28 to Jan 12View Details
SoapUI TrainingDec 31 to Jan 15View Details
Last updated: 03 Jul 2024
About Author

 

Madhuri is a Senior Content Creator at MindMajix. She has written about a range of different topics on various technologies, which include, Splunk, Tensorflow, Selenium, and CEH. She spends most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .

read less