Friday, December 21, 2012

WaitN and HTTPWatch – Latency Measurements using Automated UI Testing

I wanted the measure the latency of a website from different geo locations. Some of the calls were made by JavaScript and hence UI actions were required instead of a simple playback of HTTP requests.
So there were two major goals
  1. Automating the UI actions
  2. Capturing the HTTP traces for these actions
There are a lot of options available for UI automation but it was important that the framework I chose is compatible with the toll I use to capture the HTTP traces.
 
So the first task was to determine which tool to be used for capturing the traces. The tool needed to have the ability of starting the trace. Stopping the trace and saving the trace in an automated fashion. HTTPWatch comes to rescue here. The basic edition is available for free but you will need to buy a license for advanced operations. See http://www.httpwatch.com/
 
Now, I had to determine an UI automation framework which works seamlessly with HTTPWatch. WaitN (pronounced as What-In) can be used with HTTPWatch. There is a sample available on the HTTPWatch site, see http://blog.httpwatch.com/2008/10/30/using-httpwatch-with-watin/
 
I wrote a console app using WatiN and HTTPWatch and could run it from different geo locations to collect the results. Sweet!

No comments:

Post a Comment