[rspec-users] UI testing framework? (w/o selenium)

Bob Cotton bob.cotton at rallydev.com
Wed May 9 11:38:20 EDT 2007


"Tim Tischler" <tischler at purplecoffeecup.com> writes:

>   We have re-written our functional test framework 4 times, and finally
>   settled on Selenium. No other open-source tool gets you the
>   cross-browser, cross-platform support.
>
>   We use the Ruby bindings for Selenium-RC.
>
> How is it working?  How long did it take you from initial download of
> selenium to continuous integration deployment running tests and all, and
> how stable is it?  The documentation for selenium is horrid, and we kept
> having our very simple tests, on multiple machines, hang
> indefinitely.

I don't know if the hanging is a result of timing issues. But they are
things you have to bake into your framework. Checking to make sure
that elements are present before you try to touch them.

> We were primarily using the java flavor, as I hadn't sold anyone on
> ruby anywhere yet.

The language features of Ruby, plus things like rspec make a
compelling argument.

> Should I look again?

I think so.

>   To me, this framework is "talking" at the wrong level of
>   abstraction. The domain of its "language" has to do with the
>   underlying technology, in this case HTML.
>
> I hear you.  At some level, you do have assertions on the HTML, right? 
> You abstract them away into some class, but you do need to know that the,
> say... "left nav menu" exists on each page, right?

Yep, hide the details in the framework classes. We have a validate method
that gets called on construction, that checks interesting things on
the page. Then things like '"left nav menu" exists on each page' gets
baked into the framework. When using Ruby, you can mix-in these sorts
of things.

> Cool, thanks.  So, I'm taking it that you think I should look again at
> seleium, and that it's ready for prime time. I guess I'll give it a shot.

We've had a very good experience with it. 

 -Bob


More information about the rspec-users mailing list