Web service is a means to establish the communication/connection between two or more application servers and exchange the data between the communicated servers or machines.

Web services are mainly built on Service Oriented Architecture (SOA) technology and communicate using HTTP or SOAP protocol.

Web services are platform and technology independent.

Types of Web Service

Web services can be implemented in different ways

  • SOAP (Simple Object Access Protocol)
  • REST (Representational State Transfer Architecture)

SOAP: Simple Object Access Protocol is a standard protocol which uses the XML format for sending and receiving web service requests and responses. SOAP messages are exchanged between the applications within the SOAP envelops in WSDL format.

REST: REST is an architecture that runs over HTTP. Rest uses GET, PUT, POST and DELETE operation calls. Rest supports both XML and JSON format. RESTFUL applications use HTTP built-in headers to carry meta-information.

Web Service Testing steps

Web service testing basically involves the following activities:

  1. Understand the WSDL file format
  2. Determine the response XML format
  3. Determine the XML request format which we need to send
  4. Determine the operations provided by the web service
  5. Send web service request and validate the response

Web Service Testing for Soap service using SoapUI (Open Source)

We will consider the currency conversion utility as an example

  1. Launch SoapUI tool -> Go to File -> New Soap Project.
  2. Enter the project Name and the WSDL URL
  3. Click OK button.
  4. Expand the first request on left pane and double -> click on the ‘Request1’. It will display the SOAP request in the XML format on right pane.
  5. Enter the value for “From Currency” and “To Currency” on request xml.
  6. Click on the submit button.
  7. Response output XML will be displayed in the right side pane based on input value provided.
  8. We need to validate that the output response has the proper currency conversion based on the input currency provided.

Web Service Testing

Web Service Testing for Soap

Web Service Testing for REST service using SoapUI (Open Source)

Web Service Testing for REST service

SoapUI will create project tree along with resources, services, methods, and endpoint with input request in the editor. See below

Web Service UI

  • When we click on the parameter in parameters section, parameters used in the service are displayed in the separate popup window as shown above.
  • Click on the Run icon. SoapUI generates the following output for the given endpoint in the form of XML.
  • We need to validate that the output has the proper location for the given address.


Some of the Other Web Service Testing Tools that can be used

  1. SoapUI Pro
  2. TestMaker
  3. WebInject
  4. SOAPSonar
  5. wizdl
  6. Stylus Studio
  7. TestingWhiz
  8. SOAtest
  9. JMeter
  10. Storm
  11. Postman
  12. vRest
  13. HttpMaster
  14. Runscope
  15. Rapise
  16. LoadUI NG Pro

Typical failures noticed during Web Service Testing

  1. Fail to handle server connections.
  2. Security issues – Firewall, Authentication failure
  3. Performance Issues while API request and response time is too high
  4. Fail to handle expected response output
  5. SOAP and REST faults
  6. Input request data is invalid
  7. Response output data is not as expected.

Web Services Testing Challenges:

  1. Web service call sequencing, parameter selection and parameter combination
  2. Web service is GUI-less testing which makes it difficult to provide the input values
  3. Difficult to understand web service calls and WSDL without programming knowledge
  4. Unknown exceptions thrown from the service.

Related Posts