Web Services Testing

July 18th, 2009  |  Published in Quality Assurance, Quality Control, Quality Management, Software Development Lifecycle

Background

DCOM and CORBA traditionally achieved what web services are now offering but with an exception to interoperability which they later provide in true sense.In addition ,COM+,DCOM (Distributed component object model) implementation from Microsoft were resource intensive and were native to specific Microsoft OS flavor.In other words,consumer and provider were mandated to be on the same version of OS.

Testing Methodology

At very basic level, one need to consider how the remote calls take place via SOAP, how the data is passed, how to test the transparent layer,discovery methods,response data,scalability,performance,integrity. Test Case execution shall be top down and bottom up respectively. Documenting test cases for the individual services can be tedious task and subject matter experts can take part in unit testing the individual service so that they are error free in down stream process. This approach facilitates meeting the high level business requirements and can also be used to create data contents for the exchange message. This will avoid the major pitfall of delivering a technically acceptable solution which fails to deliver business value. Once this is done, the data must be formatted to messages (XML) that express service service request and replies from consumer and provider respectively.

Test the Transport Layer

Due to problems introduced by latency and unreliability of the underlying transport, testing the transport layer (HTTP/HTTPS/MQ/JMS) – protocols which form the back bone  in shipping the messages around . This testing can be done in isolation initially wherein the transport is tested  with the messages sent over the transport as data files instead of actual data and consequently integrate with either side once the application is complete.

Test in isolation

Isolation can be achieved by storing message in data files . For instance , a message received  by a consumer can be saved to data file or a file. The emphasizes should be more on test the web service as an independent entity regardless  of its dependency on other web services The messages must be based on specific standard and some of the industries have already started  these activities, namely Association for Corporate Operation Research and Development, regulatory standards such as health insurance Portability and accountability Act (HIPPA) for health care related transections. Interoperability can be verified using tools available such as WSS (web service studio) for a MS.NET Implementation. The new web services studio can be used to automatically generate a compile SOAP proxy classes

Verify Complex Undo Activity

Testing the fragility  of distributed systems if incompatible updates are introduced to any participant may involve validating a two phase commit if transaction has not been completed using the entire web services involved in unit of work.XLANG verifies two phases of commit for distributed transactions wherein if transaction is incomplete, express it explicitly . Additional benefits are not limited to:

  • Sequential and parallel control flow constructs
  • Long running transactions with compensation.
  • custom correlation of  messages.
  • Flexible handling of internal and external exceptions.

Functional Integration/Testing Tool Selection

Verify the flow of application where the remote method call to the SOAP server(s), is followed in a specific order as per business rule which additionally involve verifying the nested functionality from WSDL. This may include testing for interoperability as sanity tests which validate the agreed upon semantics between the services.We ‘ve experienced that all good web services test tools share the certain features (1)Scan WSDL (file or URL) to create request and response structure. (2) Contain user interfaces to XML for request and response editing. (2.1) Response is stored as checkpoint.(2.2) Regression test compares check points to run time value.(3) Allow parametrized values for request and correspondence response (data driven) After determining the requirements of functional testing it is necessary  to examine some of readily available testing tools. we are having good expertise of using SOAPSonar for testing web services. There are following SoapSonar Setup Steps

  • Download SoapSonar.
  • Load x.509 & WSDL.
  • Setup SOAP Authentication.
  • Call EC2 Soap API

Leave a Response