WCAT v6.3 Initial Setup and Run

After struggling getting the most basic of load tests running using the Microsoft Web Capacity Analysis Tool v6.3 I thought I would take the time to post. Note this will be a sample where all components are running on the same server it is not designed as an example of best practise or the way would recommend performing any testing, it is just a sample to get the tool running. The assumption for this sample is that you are an administrator on the machine in question, the machine has IIS 7+ running and has a default website bound to port 80 that can run under anonymous. There may be additional posts following this for a real world environment but the variations possible for load testing are huge including security, proxy servers, load balancing etc so if I can come up with a set of common examples I may follow up.

It comes in two versions x86 and x64 that can be downloaded using the links below:

The first step is to download and install the package, the install location will be in:

%ProgramFiles%wcat

If you look in the folder you will see the following items:

  • doc (folder) – contains a short readme and a more indepth MS Word document detailing the tool
  • samples (folder) – contains a couple of sample scenario and settings files and other files not covered here
  • report (xsl) – used for formatting the generated logs
  • wcat (windows script file) – used to run the tool (but not in this example)
  • wcclient – client test runner, this executes the scenario(s) against the target server(s)
  • wcctl – test controller this communicates with the test clients manages the tests and aggregates the results into a report
  • wcutil – utility functionality not covered here

Prior to any test runs you will need to follow the steps in the readme to set up the environment, the steps are very simple and worked as expected for me so they should be fine although you will be required to reboot and in my case there was no warning so make sure you have everything saved!

To run a test you will need two files added to the WCAT folder a scenario and a settings file, both are text files and can be named as you choose as they are referenced in the call to the controller anyway.

Settings:

settings
{
clients = 1;
virtualclients = 10;
clientfile = “scenario.txt”;
counters
{
interval = 10;
counter = “Processor Information(_Total)\%Processor Time”;
}
}

This specifies one server to be used as a test client running 10 virtual clients, in a real load testing environment it is likely you would have multiple clients each running a higher level of virtual clients. Inside the counters we have a sampling interval, this will be balanced to show enought results without impacting the tests by sampling to frequently. The next element is a counter being sampled in this case the percentage of CPU usage, you can add any number of counters in this section but be aware the more counters you have the greater the performance impact. You can find the counters by running Perfmon (Performance Monitor) this makes it easy to test and then modify your settings.

Scenario:

scenario
{
warmup = 30;
duration = 100;
cooldown = 30;
default
{
setheader
{
name    = “Host”;
value    = server();
}
setheader
{
name    = “Connection”;
value    = “keep-alive”;
}
setheader
{
name    = “Accept”;
value    = “image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, */*”;
}
setheader
{
name    = “Accept-Language”;
value    = “en-us”;
}
setheader
{
name    = “User-Agent”;
value    = “Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0”;
}
setheader
{
name    = “Accept-Encoding”;
value    = “gzip, deflate”;
}
version     = HTTP11;
statuscode  = 200;
close       = ka;
}
transaction
{
id = “default_doc”;
weight = 100;
request
{
url = “/”;
statuscode = 200;
}
}
}

This scenario file is very basic and has a short warmup and cool down of 30s each and a test duration of 100s, each time the transaction executes it hits the root site of the server and has an expected response of HTTP 200 Success.

To run the above you need to have two command prompt windows open in the wcat directory one for the client and the other for the controller. If this is on a server where the tests are going to be run frequently you may wish to consider modifying the ‘Path” environmental variable to save having to change directory. Below are the two commands that will start the first test run one to start the client and the second for the controller, run the client first then the controller command.

Client:

wcclient localhost -b

Starts the client and waits for the controller

Controller:

wcctl -f settings.txt -t scenario.txt -s localhost -singleip -extended

And thats it both windows should now be showing the current process running and results, once the run finishes there will be a log.xml file in the directory which can be transformed using the report.xsl into an html report (this should be done for you by IE if you open the xml file). As I mentioned this is not a useful test to use but should give you a starting point, from here with the documentation provided and google I quicly progressed to testing SOAP web services with posted data (hint headers are critical here).

I hope this saves someone some time in getting started with this. As a final note if things are still not working and everything looks as though it should try an additional reboot this fixed one of my deployments.

Leave a Reply

Your email address will not be published. Required fields are marked *