Is it possible to load test Web Services without front-end?
Posted: June 22nd, 2008 | Author: TnT Admin | Filed under: Concepts | Tags: Web-Services | 6 Comments »Yes, it’s possible and there are couple of ways in doing it (disclaimer: not all are applicable). Was actually responding to fews question on this topic and well, might as well share with everyone. Let’s get some fundamentals right on Web Services, (a) they can be implemented without any front-end GUI (e.g. browser) causing challenges to conventional testing techniques. If it was implemented with a front-end, that makes the scripting a little bit easier as it’s the same for conventional testers (no issue here). (b) It communicates or delivers via SOAP/HTTP. That’s to say, HTTP protocol is the medium of communication, one of the key concepts of using load testing tools such as LoadRunner is understanding the protocol. (Refer to “Which protocol to use?” on protocol fundamentals)
There are four possible ways of doing it.Ok, starting with the implementation of a front-end GUI, nothing special, just proceed with the normal clicks that makes the Web Service calls. Record and replay. In the API calls for web_custom_request, you will see the distinct SOAP envolope with their tags. As the sending of the SOAP envelope is in clear transmission, you can edit the fields in it accordingly to your needs.
For non-GUI Web Service load testing. It’s possible to test with the Web Service protocol in LoadRunner. Web Service protocol belongs to the SOA Bundle licenses. In this protocol, VUGen reads a given WSDL file (either locally or from a URL) that is being transmitted to the server. It builds the API after reading it through a step-by-step wizard. The wizard will prompt for variable values, security token, etc… When its done, replay the API.
If you are unfamiliar with the Web Service protocol, you can build a web page that make the Web Service calls. In this way, VUGen will record it as per normal web application (with a front-end). web_custom_request will be generated with the SOAP envelope in it. Similarly to the first method, you can change the fields accordingly. (Wonder if this is a license violation too?)
Lastly, you can use WinSock protocol. It’s difficult to manipulate unless you can read the packets sent over well. I would not strongly recommend using this method.
Hope the above is useful to you. If you have alternatives to test Web Services without front-end, do let us know and we will include it here.
Thanks, i got some idea now
Your welcome!
Yes Even I had the same experience
Yes ! I have done the same in project for Webservice a XMl is required as a input Even i have tried running individual Web service calls Using Both Soup_request() and Web_Service_Call
nicely written article. I have worked on web services for a quite a bit now and we have tried web_custom_request, Web_Service_Call and Soap_request for our testing. In my experience, it is easier get a soap file from the developers and create the soap_request instead of importing the WSDLs, as while importing it does not populate any parameter values. It just gives a skeleton of the soap request.
1 If a page is writed as a front-end,the extra license is not necessary
2 I trid to write a jar in java. the jar is used to consume the webservice(The jar works well in commend line). Then i select the java user to run the jar. The problem is that loadrunner give me so many exception. like :
rror: System.err: java.lang.ExceptionInInitializerError
Error: System.err: Caused by: java.lang.NullPointerException
….
Don’t know what is wrong with lr. the version is 9.0. Is there some wrong with the jdk? what i used is 1.6.