Selenium on Rails plugin


#1

One of the things I like about Rails is the built-in support for testing
â?? itâ??s almost hard not to write tests. But even if I write extensive
tests (currently â??Code to Test Ratio: 1:3.4â? according to rake stats in
a small toy project) I still feel that itâ??s not enough. I occasionally
get the urge to fire up the browser and click around to test that
everything works. You shouldnâ??t have to â??click aroundâ? to test that you
havenâ??t broken anything that often (although itâ??s probably good to use
the browser for checking usability).

Thatâ??s where Selenium comes in. Itâ??s a javascript based functional test
tool that uses Fit like test scripts to test web application directly in
the browser. There are other ways to test in browsers, like Watir, but
they donâ??t run in any browser/platform so I think that javascript based
solutions are the way to go. And for javascript based solutions I donâ??t
know if there are any competition at all.

However, I didnâ??t think that vanilla Selenium worked as smooth as it
should in a Rails context. So Iâ??ve been writing a plug-in that makes the
experience much better, IMHO. It took a bit longer than what I thought,
but Iâ??ve been busy and stuff like this takes time to get into a good
enough state to release to the world.

Please try it out and let me know if you have any problems using it or
if you have suggestions for improvements!

/Jonas Bengtsson, removed_email_address@domain.invalid, http://andthennothing.net

More info:
http://andthennothing.net/archives/2006/02/05/selenium-on-rails
svn: http://andthennothing.net/svn/public/selenium_on_rails/


#2

Thanks for this – I’ve been wanting such a thing since I read the
Selenium and Rails integration article a while back. Being lazy paid
off – I didn’t have to write it myself. :slight_smile:


#3

Benjamin C. wrote:

Thanks for this – I’ve been wanting such a thing since I read the
Selenium and Rails integration article a while back. Being lazy paid
off – I didn’t have to write it myself. :slight_smile:

Lazy is good. I was too lazy to write the tests in HTML. :slight_smile:

/Jonas