Tuesday, June 13, 2006
I know I haven't posted alot lately. In part because I still haven't gotten my laptop back, not having it with me makes it hard to write blog post when the thought hits me. So I apologize for that.

Lately at work Testing has been a big part of what I've been working on. Of course as a programmer I never want to do the same thing twice, even when testing. So we use NUnit to test the code we write however the user interface has always been a difficult beast to try and test. There were a few things out there, but they basically were HTTP recorders. They recorded your actions at the HTTP level and not at the user/browser level.  So I kind of gave up on them and gave in to the fact that I would have to do all my user interface testing manually. I wasn't happy about it, but it was what it was.

Well about three weeks ago I was listening to a back epoisode of Hanselminutes and Scott Hanselman was talking about WATIR (Web Application Testing In Ruby). Well Scott isn't one to use tools that don't work, so I gave WATIR a try. It is brilliant. I can't say enough good things about this tool. WATIR basically is a Ruby wrapper around the IE DOM. So you are scripting out what is going on inside the browser. There is the minor issue of having to learn Ruby. Believe me it is a minor issue. The examples and documentation that come with WATIR will have you writing tests in no time. Honestly I think that my first test was written and working in under 10 minutes.

What is so nice about WATIR is it seems to use the same pholisiphy as Ruby. David Hienemeier Hansson, puts it really well in the 6/2006 issue of Linux Journal " Ruby is more than anything else, a language for writing beautiful code that makes programmers happy. After writing and running your first WATIR test you will be happy.


6/13/2006 10:04:53 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0]