So I went to a presentation today, run by Aidy Lewis and Josh Chisholm about Josh’s new RQuery project; here’s a braindump of what I remember.
RQuery is not supposed to be a competitor to Selenium or Watir but builds on top of it to provide a few things… the ones that interested me were the ability to query for objects by using css selectors, and the fact that it converts ruby into javascript so that very little work is done inside the browser.
The css selector stuff is done by injecting jQuery into the page that’s being tested (if it’s not already there). This is pretty cool because it means you don’t need to worry about browser specific ways to select stuff (useful, since watir and selenium are/are going to be sat on top of webdriver so browser agnosticism is important). It also means that you don’t need to know xpath – cool if you’re a webdev since you don’t want to learn something new, and you probably already know css!
The ruby-to-javascript stuff also looks pretty cool: instead of running loads of ugly javascript in the browser, the ruby code in your test is converted to some simple jQuery and that is what gets executed. Interesting to note that in the demo we saw, the tester (sorry, didn’t catch your name!) mentioned that the only downside to this is when debugging – did the error occur in ruby? In the ruby-javascript translation? In the CSS? In the browser? In the AUT?
Check out the rQuery wiki for how to get started.
Overall, RQuery looks like a cool project. I’ll be following it for sure…