Tuesday, December 23, 2008

Selenium vs. Watir

One of the main testing activities I have been involved (or studied) in the last couple years is more or less related to testing web-based applications (either pure e-commerce, web-app, web-security or even appliance). For all of these related technologies, testing web-page is a norm and there are few methods to get the job done:
  • Manual testing. The dumb way but still sometime the most productive way for the initial exploratary testing. I don't see any way to totally avoid it!
  • Simple scripting…like wget. Sometimes, if one just needs check if a site is up and one or couple pages are there, using wget combined with some simple shell scriptsis probably one of the best choices.
  • Regression Testing (or even functional testing); here we need some heavy-duty scripting tools. I did try the most expensive tools; like SilkTest, WinRunner, and also the so-called QTP (now part of HP); but I have never liked it: way too expensive and dumb (prietary scripting).

Well, the alternatives are available; and I believe they are quite useful and, even (IMO) better than the commercial QTP or like.

Our of all of the alternatives, two of them stand out: Selenium and Watir. There are lot of discussions and comparison between these two and here are my reasons of choosing Selenium over WAITR:

  • Linux support: Selenium is much better than Watir; Watir was rooted for MS-IE-Ruby platform
  • Python support: Selenium had Python support at beginning and Watir was a pure Ruby toy. Oh, why Python over Ruby? Speed!
  • Doesn't Watir have anything better? Yes, Watir is better in supporting DOM objects, purely IMO. In addition, if the AUT is written in Ruby, there should be some build-in benefits,…, but dont quote me on it; I didn't go that far on this approach
  • At last, if one has exposed to any unit-testing framewrok, like Xunit, Junit, and Selenium could integrate with the Python unit test: Pyunit.

1 comment:

  1. I found this comparison interesting and thought people may be interested to see different views on the same subject:
    http://blog.charleybaker.com/2008/06/this-is-my-short-response-on.html

    ReplyDelete