Tuesday, August 09, 2005

Watir, Watir Everywhere...

Based upon the recommendations of several bloggers (such as Scott Hanselman), I've had a look into using Watir to automate browser based tests. Basically what I wanted was to be able to run the test (and worry about NUnit integration later), from a nice scripting environment. So here's what I had to install: And I managed to get a very nice script tool with integrated script launch capability - very nice. But what about the problems? Like anything new, I did run into some problems:
  • When trying to run unit tests by making use of the Ruby test/unit library I got the following error: C:\Ruby\bin\rubyw.exe: No such file or directory -- plugins/org.rubypeople.rdt.testunit_0.5.0/ruby/RemoteTestRunner.rb (LoadError) From further research it seems that this is an issue between RDT 0.5.0 and any Eclipse version higher then 3.0 (note that is doesn't seem to work with v3.0.2 either)
  • On subsequent runs of the script (launched quickly), I would get the following error: W, [09-Aug-2005 16:21:47#1676] WARN -- : runtime error in wait I read somewhere that this was a bug in the Watir code - I think it happens when the script gets ahead of the browser window.
Where to from here?
  • Try version 0.6.0 of the RDT when released to see if it sorts out the unit test integration
  • Integrate with NUnit

No comments: