Enroll in Selenium Training

SOAPUI Tutorial

API testing is an integral part of almost every quality analyst in the software industry. There are multiple tools/frameworks available in the market, which aids in API automation. For example, SoapUI is one of the leaders in the market, which has made the API testing very easy for all the testers. It is a cross-platform API or Webservices testing tool that can do both functional and non-functional testing of API or Webservices. Also, as it is java based tool, it can run on most of the latest operating systems, including MAC, Windows & Linux.

Subsequently, in this SOAPUI Tutorial, we are going to cover the following topics to start our journey of learning SoapUI:

SOAPUI Tutorial – Basics

SoapUI introduction: SoapUI is an open-source web service / API automation tools widely used in the software industry. It is currently taken care of by Smart Bear Software. SoapUI is renowned for the vast number of assertions and good community support which helps in easy to do automation. SoapUI comes with a licensed version too which enhances the features and users can perform load/performance tests too. The best part of SoapUI is that, it can handle both REST and SOAP.

Install SoapUI on Windows/MacOS: SoapUI is an easy to install software and it is available on the SOAPUI.org. This download will always be the latest version. It comes in two flavors. You can install both licensed and free version. The paid version of SoapUI is known as Ready API. It is a groovy based tool but it’s not mandatory to have groovy installed on your systems it comes with inbuilt groovy support.

SoapUI Project: In SoapUI you can create both SOAP as well as REST projects by using WSDL / WADL. You can wish to create an empty(Generic) project and decide later on whether to create a SOAP or REST project. We will understand the types of projects which we have and how can we create all of them with examples. We will learn about the concept of workspace in SoapUI

SoapUI Test Case: Any tool without the tests is incomplete. We will understand the hierarchy of test cases in SoapUI. You can add a test suite and then under suite you can add multiple test cases. In each test case, there could be multiple test steps. This quality of SoapUI makes it unique from the other tools in the market

SoapUI Assertions: Once you have created a project and added a test case, we ready to add some validations and checks in the form of assertions. Assertions are nothing but a basic condition to validate the target response. There are different types of assertions available in SoapUI. You can also add REST / SOAP specific assertions. We will learn all the categories of assertions in this article.

REST Services Assertions: In SOAP UI you can add some specific assertions on REST project. JSON Path count, JSON Path Match Assertions are one of the assertions which can help in the validation of a specific node in the JSON response. We will be using TOOLS QA Book store API as an example to validate the count of the nodes and then validating specific node value in the target response.

SOAP Services Assertion: As SOAP response contains XML only, XPath match and XQuery Match assertions can be used to validate the content of the target property. SoapUI gives you the option to customize the XQuery / XPath to fetch any node in the SOAP response. We will understand the concept of namespace and we will see how can we write a query in an assertion using namespace.

SoapUI Common Assertions: As a part of Assertions in SoapUI, there are a variety of assertions available. Some of them are common for both REST & SOAP both. Contains, HTTP status, SLA are some of the assertions which can be applied to validate both REST as well as SOAP response. We will cover all the common assertions available in SoapUI in this topic.

Script Assertions in SoapUI: During the API automation using SoapUI, there will be specific scenarios when the core test assertions provided by the SoapUI will not be sufficient for all the validations. Therefore, to handle such situations, SoapUI provides the capabilities to implement the validations using Groovy Scripts. These validations are known as “Script Assertions in SoapUI”

Properties in SOAPUI: A Property is a named string that has a specific value, and we can access that key and value via a script or program. SoapUI also provides the capability to define and access properties at multiple scopes, which makes the maintenance of tests very easy by allowing data flow using properties to across tests at different scopes.

Property Transfer in SoapUI: Whenever we are testing the APIs, there are requirements that we need to extract the values from the response of one API and pass those values in the request for another API. To handle such scenarios, SoapUI provides the capability to transfer data from one test to another by using the feature “Property Transfer”.

What is SoapUI?
What is SoapUI?
Next Article
Lakshay Sharma
I’M LAKSHAY SHARMA AND I’M A FULL-STACK TEST AUTOMATION ENGINEER. Have passed 16 years playing with automation in mammoth projects like O2 (UK), Sprint (US), TD Bank (CA), Canadian Tire (CA), NHS (UK) & ASOS(UK). Currently, I am working with RABO Bank as a Chapter Lead QA. I am passionate about designing Automation Frameworks that follow OOPS concepts and Design patterns.

Similar Articles

Feedback