Kelly Felkins's blog



Kelly FelkinsKelly Felkins
Happy Path Testing With Selenium RC Fu
edit Posted by Kelly Felkins on Tuesday February 05, 2008 at 03:51AM

Selenium RC Fu is a fantastic system for testing Ruby On Rails applications. It is the blending of xUnit testing with Selenium. Selenium is a cool system that operates your browser as if a human were sitting there moving the mouse pressing buttons and keys.

Selenium RC Fu is also a remarkable example of the power of open source. It's selenium remotely controlled by rails and ruby. You can learn more about it by viewing the slides for Full-stack webapp testing with Selenium and Rails presented by my colleagues Alex Chaffee and Brian Takita at the SDForum Silicon Valley Ruby Conference.

Now that you are excited about Selenium RC Fu, by law I must inform you that this wonderful testing tool comes with some costs. First, this is the daisy cutter of testing -- problems will be detected, but it won't be too specific about those problems. A failed selenium test will likely only tell you some expected text was not present on the page -- you have to do some digging to discover the real problem.

It's also slow. To be fair, a lot of software is running to do this testing.

So use selenium testing sparingly. A good strategy is to restrict selenium testing to "happy path" testing. These happy path tests become a compliment to other more focused and faster unit and integration tests.