How to do Web Service Testing ????
Recently I have completed a project on Web Service Testing. Till now I have executed around 10 -12 projects as a Sr. Software Development Engineer in Test but never found any project which is more challenging and interesting when it comes to web service testing.
The entire blog is written into 3 sections:
1. What is Web Service
2. Scope of Testing Web Service
3. Approach to test a web service
What is a web service…
Few months back in a discussion I came across the word “SOA”. I was completely unaware of the word “SOA”; what it is ; how it helps; is it a standard like IEEE etc…
But after the WS testing project, I came to know about SOA. This definition is taken from Wikipedia which I found is the most relevant among the web search I did for defining SOA.
Service-Oriented Architecture (SOA) is a software architecture where functionality is grouped around business processes and packaged as interoperable services.
SOA actually aims at providing a loose coupling of services which underlie applications. It separates functions into different services which are available over a network and can be re-used.
In simple words web services are like an API available over internet to be re-used. So a web service is a system which sits somewhere on a network and all it ever does is service specific requests from clients.
Scope of Testing Web Service…
We can divide web services into 2 categories: one which is used over internet and the one which is used over intranet. The challenging part in web service testing is that they don’t have UI. They are completely UI-less. So this pose a problem that manual testing of web service is going to be a tedious job. But trust me if you are aware of programming and have done some programming then it is going to be the most interesting project. So the foremost condition for web service testing is that one should know programming and have good programming skills.
So the first question which comes to mind is what all I can do in the testing of web services. We can do both Functional Testing & Non Functional Testing. Functional testing will do the data verification part and the non functional testing will look into the response time, scalability issues and performance issues.
Approach to test a web service…
All the web services will either interact with XML as a data source or any database. So functional testing will include providing various input combination and verifying the output result with the source data.
Non Functional Testing will include load and stress testing of the web services. The idea behind the load/stress testing is to figure out how the web service scales as the number of request (clients) accessing it increases. So there are few questions which we need to answer while doing non functional testing like if we double the number of users, do response times stay the same? If we double the number of servers running your web service, does its capacity double?
There are various testing tools available in the market like ANTS, AdventNet QEngine which can be used.
But I prefer using C# and VS 2005 to do the functional testing of web services. NUnit Framework can be used to create test case and execute it . But one has to be good in programming and understand the structure of NUnit.
Till Then ...Bye Good Night ....