Tuesday, November 27, 2007

Load Testing Web Applications using Microsoft’s Web Application Stress Tool

As you all know, when testing WEB applications, we need to concentrate on many areas. Following is a list of things that we generally have to focus on when testing WEB applications.

- Load and Performance Testing
- Link Checking
- HTML Validating
- Web Functional/Regression Testing
- Web Site Security Testing
- External Site Monitoring

Most of all what we have to concentrate on is Load balancing and Performance Testing. Why load balancing? One would ask. Well, a web site is meant to be accessed by a whole bunch of people out there. At this instant thousands of people must be accessing the Google site. Millions of people must be reading things on CNN. Therefore these sites need to be stress tested before actually putting them out for production. That's why these type of stress testing tools are very valuable for testing such web applications.

Some time back, at the my previous company which I was employed at, they developed a Java application which included a WEB application as well. This site was meant to be used by thousands of concurrent users. Therefore, it was very important for the site to be stress tested. As a result, we used WAST to do the performance testing and it became very successful. I think if we could research more on this tool, we should be able to use it for the future WEB applications that we develop at WSO2. I’m just giving you all a small introduction on the tool.

This was taken by an article written by By Rick Strahl. For more information refer http://www.west-wind.com/presentations/webstress/webstress.htm

Microsoft's Web Application Stress Tool provides an easy way to simulate large numbers of users against your Web application. This tool makes it possible to make intelligent decisions about hardware and software load incurred by your application and how much traffic a given machine or group of machines can handle. In this article Rick shows how the tool works and how to properly interpret the performance data it generates

Introduction


This article shows how to use the MS WAST ( Microsoft Web Application Stress Tool ) to perform stress and performance tests of Web Services.

This paper was thought for developers working with Web Services using SOAP. Some of the steps used in this article are directed towards the eSoap Toolkit , but the majority of the themis generic and could be used with any other toolkit.

In this article we present only the initial setup. For full understanding of WAST, we strongly recommend you to read its documentation, specially the Tutorial, and try using it for "tuning" your Web Service.
Step by Step Procedure

The most basic pre-condition to use this tool is getting familiar with it. It is very simple, and we recommend going to Microsoft site, and reading the tutorial for while.

1. Create a "New Script"
2. Specify the destination server


3. Add a POST verb, specifying the actual "URI path" for the Web Service. You get this from the WSDL file. For eSoap we use: /rpcrouter

Please double click on the 'button' just to the left of the verb to "edit the verb".


4. Edit the Verb

The step above brings up a tabbed selection window where you enter the settings.


5. In the QueryString tab, uncheck 'Format data to CGI standard' (see above).
6. In the Post data tab, set the choice to Text and enter your SOAP Envelope (XML message).


NOTE: eSoap Specific: With eSoap it is easy to get "Envelope" data using a tool like proxyTrace developed by Simon Fell. From proxyTrace you could get the content of the "Request Envelope" and all necessary "HTTP Headers" that might be needed on the next step.


Using "proxyTrace" with eSoap is very easy. Basically you have to setup the environment variable "HTTP_PROXY=http://localhost:8081" to the location where the proxy is running. This environment variable should be active on the context of each client process written using eSoap run-time. In this case, you started the "proxy" the local machine listening on port number 8081.

7. In the Header tab, set the HTTP header settings that are important for SOAP (for eSoap they are ):

·Content-Type to: the_number_bytes_of_envelope
·Content-Length to: text/xml; charset="UTF-8"
·SoapAction to: the_soap_action_goes_here

Example for eSoap:
Content-Type: text/xml; charset="utf-8"
Content-Length: 526
SOAPAction: "some:action"




NOTE: "Content-Length" is automatically filled in, if you leave the value "blank". Erase the "automatic" option.

8. Close the edit dialog and run the script.



9. Selecting Test duration and concurrent connections (threads)

By just reading the article anyone can easily learn how to use this tool. I hope we will be able to get some use of this tool if used one some of our products like ESB or WSAS.

These information was taken from the article http://www.connecttel.com/index.php?link=_MS_Wast_N_eSOAP.html