Introduction to Web Services Testing


Introduction to Web Services Testing

1) What is Web Service?
  
> Web Services is the mechanism or the medium of communication through which two applications / machines will exchange the data irrespective of their underline architecture and the technology.

2) Why is Web Service Needed?
         
> In general, software applications are developed to be consumed by the human beings, where a person sends a request to a software service which in-turn returns  a response in human readable format.

> In the modern era of technology if you want to build a software application you don't need to build each and everything from scratch. There are lots of ready-made services available which you can plug into your application and you can start providing those services in your application.

For example you want to display weather forecast information you don't need to collect, process and render the data in your application. You can buy the services from the people who already well-established in processing and publishing such kind of data.

Web services allow us to do these kind of implementations. 

3) How to implement Web Services?

> Web Services can be implemented in different ways, but the following two are the popular implementations approaches.

i) SOAP (Simple Object Access Protocol)
ii) REST (Representational State Transfer architecture)

4) What is SOAP?

> SOAP (Simple Object Access Protocol) is a standard protocol defined by the W3C Standard for sending and receiving web service requests and responses.

> SOAP uses the XML format to send and receive the request and hence the data is platform independent data. SOAP messages are exchanged between the provider applications and receiving application within the SOAP envelops.

> As SOAP uses the simple http transport protocol, its messages are not got 
blocked by the firewalls. 

5) What is REST?

> REST means Representational State Transfer; it is an architecture that generally runs over HTTP. 

> The REST style emphasizes the interactions between clients and services, which are enhanced by having a limited number of operations. 

> REST is an alternative to SOAP (Simple Object Access Protocol) and instead of using XML for request REST uses simple URL in some cases.

6) What is WSDL?

> WSDL (Web Services Description Language) is an XML based language which will be used to describe the services offered by a web service.

7) What is Web Service Testing?

Web Services Testing is testing of Web services and its Protocols like SOAP & REST. 

To test a Web Service you can,

> Test Manually
> Create your own Automation Code
> Use an off-the shelf automation tool like SoapUI.

WebService Testing involves following steps -

i) Understand the WSDL file
ii) Determine the operations that particular web service provides
iii) Determine the XML request format which we need to send
iv) Determine the response XML format
v) Using a tool or writing code to send request and validate the response

Suppose we want to test a Web Service which provides Currency Conversion Facility. It will the current conversion rates between the different countries currency. This service we can use in our applications to convert the values from one currency to the other currency.

8) Using a Tool or Writing Code to Test Web Services....

> There are lots of tools available to test web services. SoapUI is one of the 
popular tool which will help us to test the web services. 

> In fact you can use the any programming language which is capable of sending the XML request to the web service provider application over the http and able to parse and validate the response XML against the expected result. 

In our case, we can test the WebService, 

> Using Java
> Using SoapUI

9) What is SoapUI?

> SoapUI is an open source, cross-platform testing tool. It can automate functional, regression, compliance and load testing of both SOAP and REST web services.  

> It comes with an easy-to-use graphical interface and supports industry-leading technologies and standards to mock and stimulate behavior of web services.

0 comments:

Post a Comment