Web Services Testing Tutorial

Web Services Testing tutorial

Web Services Testing Tutorial

In this multi-part web services testing tutorial, we will look at how Web Services testing can be conducted using SoapUI. we will discuss the fundamentals of Web services and Service oriented Architecture in part 1. will discuss Web Services testing using SoapUI in the next two parts.

Let’s understand the Web services before we get into web services testing.

Introduction to Web services

Typical software applications are developed for human interactions, however there are scenarios which requires automated machine to machine interactions without human interventions.

Let’s consider a case of travel booking site. We have a number of such websites like Makemytrip, Cleartrip, Goibibo etc. To buy a ticket, you first search for all the available flights and based on your timing preference and budget, you book a ticket. Do you think, each of these websites, show you similar flight schedules? Actually they do.

That means that they are using similar source for the flight schedule and that source is not part of these websites but is maintained independently.

This centralized source of flight information is maintained by Global distribution systems (GDS). All the travel sites like MakemyTrip and ClearTrip connect to these GDS servers for getting the real-time flight schedule data. The GDS is known as a web service.

Web services are accessible over the web and are designed to be machine readable so that no human interaction is needed to access the service.Whenever a visitor searches the flight information from one destination to another, these websites fetch the data from the GDS servers based on visitors search criteria. The visitor does not need to go to these websites/servers for fetching the data.

What we discussed above, is an example of machine to machine interaction and web services are designed for these interactions.

GDS web service is a publicly available web service. Another example of publicly available web service is payment gateway service. However these are paid web services. There are examples of public web services, which are free of cost like Google Maps.

How web services are used in Enterprises

We will take an example of a bank. Banks have multiple divisions like home loan, auto loan, banking, credit card etc. Automation of these systems happen at different points in time and possibly using different technology platforms. Over a period of time, these applications need to talk to each other as well. It’s not possible to make them talk to each other, if they are not on the same technology platform. How will a JAVA application talk to a .NET or C++ application? It’s also not feasible to change the platform for each one of them for obvious reasons.

Service oriented architecture is the best suited architecture for these kind of enterprises. Web services are developed around these applications making them universally accessible from any of the applications. In the next section, we are going to discuss the web services technologies and components.

Web Services Components

We discussed about machine to machine interactions as one of the key characteristics of a web service. In order to support machine to machine interactions, you need to have the following capabilities in a web service:

  • Platform independence
  • Language independence
  • It also needs to searchable through standard search mechanisms for a machine/program (Self-describing)
  • The interface should be in public domain (that means input and output information should be publicly available)

Let’s see how web services are used by looking at the following diagram:

A web service is the service provider and any application making use of the web service is known as service consumer. The service consumer has to find a service from a service directory. These are the 3 primary components of any web services eco system.

Web services can be public services or can reside within an organization. But, in the given context, they are accessible to any consumer irrespective of the technology platform. So a .net application as well as a java application can consume a web service in a similar manner. That’s the reason, we identified platform and language independence as key characteristics of web services.

Having discussed web services, it’s time to look at a formal definition of web services by W3C:

“A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.”

We will discuss the terms like WSDL, SOAP etc in Second part of web services testing tutorial.

 

Leave a Reply

Your email address will not be published. Required fields are marked *