For performance measurement
Download and install Internet Information Services (IIS) 6.0 Resource Kit Tools. For the purpose of our exercise there is no need to install all the tools included with the resources kit, only WCAT.
Create configuration files
There are three textual files one needs to create and configure (you can give any name and extension of your choice):
script.txt – this file defines the requests, in other words what pages to request and how to request it. Following is an example of simple script.txt file:
classId = 1
NEW REQUEST HTTP
Verb = “GET”
URL = “http://localhost/BankingShmanking/Default.aspx”
distribution.txt – defines weights among different requests. For example, if I need to generate request to page1.aspx twice as to page2.aspx, I will define it in this file. In case of loading only one page, the file is meaningless. Following is an example of simple distribution.txt file (1 refers to classId in script.txt file, and 50 is that 50% of the load should got this file which is meaningless since there is only one page to request, thus it will get the whole 100% load):
config.txt – determines the duration of the test, number of clients that will generate the requests against the web application. Following is the example of simple config.txt file:
Save the files in “C:\Program Files\IIS Resources\WCAT Controller” folder.
Run the test
To run the stress test open command prompt by opening Run window(Windows + R) type cmd and hit Enter. Change current directory to “C:\Program Files\IIS Resources\WCAT Controller>” and run the following command to test the page hosted on the localhost:
wcctl -c config.txt -d distribution.txt -s script.txt -a localhost
then open second command prompt, change current folder to “C:\Program Files\IIS Resources\WCAT Client” and run the following command to actually launch the virtual client’s requests from local machine: