Cuke+Selenium

1 view
Skip to first unread message

Tero Tilus

unread,
Aug 17, 2009, 4:57:29 AM8/17/09
to cu...@googlegroups.com
I'm about to start putting together a testsuite for legacy Perl webapp
(to support refactoring it) using Cucumber + Selenium. Currently only
in-browser testing is possible (and that's why I'm starting with
Selenium). I'm looking forward to be able to ditch the browser for
increasing portion of cases in the future.

Anybody ever done anything similar? Lessons learned? All hints,
thoughts and mindflow is warmly received.

--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/

aslak hellesoy

unread,
Aug 17, 2009, 8:18:22 AM8/17/09
to cu...@googlegroups.com

I'm about to start putting together a testsuite for legacy Perl webapp
(to support refactoring it) using Cucumber + Selenium.  Currently only

What web testing framework have you evaluated? How did you decide to use Selenium?

Aslak
 

Tero Tilus

unread,
Aug 17, 2009, 9:59:18 AM8/17/09
to cu...@googlegroups.com
2009-08-17 14:18, aslak hellesoy:

> What web testing framework have you evaluated?

This far none. I might have given an overstatement. :) I was going to
start poking around to find out.

> How did you decide to use Selenium?

After reading bunch of blog entries I decided to try Selenium first.
I'm by no means yet fixed myself to anything else than Cuke (which I'm
familiar with).

ps. Already facing a situation. With Debian Lenny, Cucumber 0.3.96,
selenium-client 1.2.16, Sun JRE build 1.6.0_12-b04 and Selenium RC
1.0.1 I get http://pastie.org/585868 (already checked
http://clearspace.openqa.org/thread/14504?start=15&tstart=0 and a few
others with no avail). Any ideas? (And yes, it looks like this is
likely an issue with Selenium, not Cuke)

Ben Mabey

unread,
Aug 17, 2009, 10:33:40 AM8/17/09
to cu...@googlegroups.com
Tero Tilus wrote:
> 2009-08-17 14:18, aslak hellesoy:
>
>> What web testing framework have you evaluated?
>>
>
> This far none. I might have given an overstatement. :) I was going to
> start poking around to find out.
>
>

I would suggest trying out Celerity. http://celerity.rubyforge.org/ It
wraps HtmlUnit in the watir API (http://celerity.rubyforge.org/).
HtmlUnit simulates browsers by using the Rhino JS VM to execute JS. The
benefit of this this is speed, easier CI setup, etc.. Plus, when you are
using Celerity since it adheres to the watir API you can swap it out for
a real automated browser solution from the watir family. I just began a
project with Celerity and I have been quite pleased so far.

It may or may not work for your site however. HtmlUnit, IME, can be a
bit finicky when it comes to JS. Meaning, if you are not using a
supported JS lib then HtmlUnit may blow up. It is definitely worth
giving it a look though as it could save you a lot of pain.

-Ben

Tero Tilus

unread,
Aug 18, 2009, 4:56:15 AM8/18/09
to cu...@googlegroups.com
2009-08-17 08:33, Ben Mabey:

> I would suggest trying out Celerity.
...

> It may or may not work for your site however. HtmlUnit, IME, can be
> a bit finicky when it comes to JS. Meaning, if you are not using a
> supported JS lib then HtmlUnit may blow up.

In this case theres a ton of (legacy) JS and no particular JS lib. ;)

> It is definitely worth giving it a look though as it could save you
> a lot of pain.

I'll give it a try.

Tero Tilus

unread,
Aug 18, 2009, 7:54:10 AM8/18/09
to cu...@googlegroups.com
2009-08-17 14:59, Tero Tilus:

> ps. Already facing a situation. With Debian Lenny, Cucumber 0.3.96,
> selenium-client 1.2.16, Sun JRE build 1.6.0_12-b04 and Selenium RC
> 1.0.1 I get http://pastie.org/585868

Solved.

Selenium wants to run binary directly (not the wrapper script), so I
symlinked firefox-bin to /usr/local/bin. FF looks for application.ini
from $PATH (!!), can't find and dies. Instead of symlink, just add FF
dir (in my case /usr/lib/iceweasel) to $PATH.

Reply all
Reply to author
Forward
0 new messages