Simple HTTP Testing Utility
There was an interesting post on Ajaxian last week about a testing utility for XMLHttpRequest. Kris Zyp had written RESTTest for his own uses and talked about it during his session at The Ajax Experience. There were requests to make his utility openly available, so he did just that. The comments on the post point to other such utilities; all of which I have problems with that Adobe AIR can solve.
The first problem is a dependency on Firefox. Over the past few releases, I’ve found Firefox increasingly unstable on Mac (which I use for development). I now use Safari 3 as my primary browser. There’s a side benefit in that Adobe AIR uses WebKit for it’s HTML rendering, so it makes my life easier to just use Safari. That means in order to run RESTTest or Poster, I’d have to run both Safari and Firefox - and that I’d be running Firefox just for the extension.
The second problem I have is that I don’t know XUL or how to make a Firefox extension. If I wanted to extend any of the existing projects, I’ve have to learn a new skill. At that it’d be a new skill that’d only be applicable for Firefox or other XUL-centric projects. I do know HTML, JavaScript and CSS however, so I could build right away with Adobe AIR, and not have to learn any new languages or mark-up schemas.
I’ve been doing a lot of development against the Adobe Share API’s of late, so having a testing utility handy would prove really useful, but I don’t run Firefox and don’t know XUL. Inspired by the work on RESTTest and Poster, I set out to make my own little testing utility. I call mine HTTP Tester, and it was written entirely with pure HTML, JavaScript and CSS.

I had to know nothing about Adobe AIR other than how to use the Dreamweaver CS3 extension to test and package the application (two simple dialog boxes). Aptana has a similar plug-in. Even if I was going with the lowest common denominator of the command-line, I’d only have to learn about AIR’s XML descriptor file and the command-line options. To actually build the application there’d be no Firefox-specific tutorials or learning XUL, just good old W3C standards.
There’s one other utility mentioned in the Ajaxian thread, Fiddler. The problem I have with Fiddler is that, again, I run a Mac and Fiddler is Windows only. It looks like a great standalone tool, but I need my applications to be available on the Mac, if not competely cross-platform. Since I used Adobe AIR, my HTTP Tester utility will work on Mac and Windows today, and Linux in the near future (AIR is still a beta technology and not yet available on Linux).
There’s an entire aspect I chose to ignore for this application, desktop integration. If I was willing to learn just a little more about Adobe AIR, specifically a few new classes, I could add features like storing preferences and requests/responses to the local disk, and native drag and drop of data files into/out of the application. I could also freely access the clipboard. I’ve already been able to stylize the application using only my existing HTML knowledge, but this could even be extended to custom chrome.
I don’t plan to do any further development on this project, as it was simply an experiment to see if an equivalent tool could be created using only HTML, JavaScript and CSS with Adobe AIR. I also haven’t done any extensive testing of the tool beyond a few queries of each HTTP method (GET, POST, PUT, DELETE), so this isn’t really a production quality tool. Feel free to take the source code an expand and/or improve upon it. Or just explore the project to see just how far your HTML knowledge can take you on the desktop.
November 7th, 2007 at 9:39 pm
Hey Kevin,
Not sure if you’re aware, but the download link leads to a 404. Would love to get my hands on the code!
November 8th, 2007 at 10:37 am
Whoops!
I usually test all my links before I post, but I must have missed that one! The link has been updated.
Thanks,
Kevin
April 30th, 2008 at 6:33 pm
I am Use this DejaGnu is a framework for testing applications such as Tcl, C, C++, Java, and network applications, and cross testing embedded systems. Its purpose is to provide a single frontend for all tests.
April 30th, 2008 at 6:57 pm
Another great article Kevin. I certainly share your concerns over the stability of Firefox - even the simplest of things like bookmarks disappearing make an overall pleasurable experience go sour.
May 2nd, 2008 at 3:16 am
The link is fine now and I will take a look at the source code. I am not the greatest developer but I am very curious
May 2nd, 2008 at 1:00 pm
Nice utility there Kevin!
May 11th, 2008 at 1:50 am
As other have said thanks for the work you have put into this
May 13th, 2008 at 12:26 pm
I am also curious about the code because I don’t believe I have the required skills to develop it further.
May 18th, 2008 at 2:33 pm
Yes, i also have the same problem i.e download link leads to a 404, are you still working on it or this is final edition of Simple http testing utility?
Simon G.
May 21st, 2008 at 6:34 am
Nice utility there Kevin!
June 1st, 2008 at 5:42 pm
Hi, I have discovered this utility today. Install and test on Firefox 3 RC. A nice and easy utility. Thanks
June 2nd, 2008 at 6:47 am
I regularly use firefox. I find it much quicker and more stable than internet explorer. When I do have problems, it’s normally my fault, as I’ve opened a few too many tabs. Firefox is always advertised on video streaming sites as being quicker, though maybe that’s so they can advertise the affiliate scheme.
John
June 5th, 2008 at 1:26 am
Nice utility kevin, I have downloaded this and it is working good.
thanks,
Franklin J.
August 17th, 2008 at 11:36 pm
Hey Kevin
Great article thanks again for sharing some great info. I agree that Fire Fox seems to be more and more unstable. I do not understand why things always seems to get worse as developer try to up grade and improve things. Do these people not use their own stuff??