In the past I’ve written about my use and the value of the testing and development tool HTTPWatch. In the latest release of HTTPWatch (4.1) Simtec has added to its value by exposing an interface to be used for automation. My thoughts on the matter: “Whoa..that’s freakin’ cool, now I can automate some of the things I have to test manually for?”
The HTTPWatch automation interface as described by the folks at Simtec:
I’ve played around with the new interface for a little more than a week now and the more I play the more I realize how valuable analyzing the HTTP traffic on the fly during an automated test could be. While exploring the interface, I put together a Visual Studio .NET 2003 project with some examples of the things that can be done:
- Check every request for 404. This isn’t just page requests, this is all HTTP traffic that goes along with the page (e.g. catch broken images, missing .js files, etc.)
- Check every request for 500. Same as above except for 500s.
- For performance improvements, check to see if .jpg, .gif, .css, .js are found in cache instead of being downloaded with each page request.
- For performance improvements, check to see if .jpg or .gif files are greater than a designated byte size.
- Check that objects don’t exceed a specified download time.
My demonstration project that uses the HTTPWatch interface, IE, C#, and NUnit can be downloaded here (thanks Matt for helping me refactor it). Compile it, point NUnit at HTTPWatch_NUnit_Demo.exe and run the 5 tests. The NUnit Test Suite will conduct the 5 tests noted above against Ebay.com which will work with HTTPWatch Basic Edition (their demo) and the Professional Edition.
The project is pretty simplistic due to it only validating one page, but hey it’s a demo. Now that I better understand the interface, the BIG VISION for its use would to be to be open a browser, turn on HTTPWatch, log all the traffic for each page in my Website, and then conduct a battery of tests against the log, dumping the details to NUnit.