|image credit : www.whitewebservices.com|
So it is like divide and rule principle. If a web services is implemented, testing of the service can be done irrespective of other services.So in a word we can call them as testing component by component.It makes the testing process more agile and flexible.
The common approaches for web service testing are:
1. Unit Testing
As web service is a component driven approach, it is extremely necessary to test the web service to check if it is working as per th expectation.
This is nothing but normal unit testing using any x-unit tool. Say my web service is written in VB then I must use VBUnit or if it is written in java then I must use JUnit tool to ensure to cover the logic of web service operation.
2. Functional Testing
After the deployment of web services in the service container , it is time to test it functionally.It is required to verify if it is functioning properly.
Web services interface XML is machine readable but not human readable. So we need a tool that will understand the XML viz WSDL. So it is important to make sure that the WSDL is constructed in correct manner and any third party tool can understand the WSDL or XML.
Tools currently available in market-SOAPUI and OATS(Oracle Application Test Suite)
Second object of testing would be that the associated client API's must be invoked programmatically or by internal trigger.
3. Integration testing
Web Services is a component by component architecture.Multiple components works as brokers or service coordinators.In this type of testing we use to make sure the architecture does not break down.Mostly test the enterprise Service bus(ESB). We also make sure the request message gets forwarded to the ESB component, not the Web services.
4. Performance Testing
Like E2E testing of normal application , the last phase belongs to Performance testing.Once Functional Test engineer certify the Web services , it will go to performance test engineers for further testing.
- Load Testing
- stress Testing
Apache JMeter is a nice open source tool performance testing,loadrunner,OATS,SOAPUI need to have license to execute performance testing on Web services.