[twill] twill & spidermonkey?

Titus Brown titus at caltech.edu
Fri Mar 17 23:08:45 PST 2006

On Fri, Mar 17, 2006 at 05:35:20PM -0500, John Mudd wrote:
-> I just found twill, it's great!  I especially like that it's not
-> integrated into a browser like Selenium.   My reason is that I have to
-> ssh to another Linux box, start my browser there to access the web
-> server on a Solaris box.  Using ssh causes the browser to appear on my
-> home Linux system but requires a lot of net traffic which slows
-> testing.  Using twill I get fast results.
-> Except the web app uses JavaScript so now I'm preparing to give
-> Selenium a try after all.  I'll have the added challenge of running
-> Selenium on a different box than the web app.  Even if it works I'm
-> afraid it will be slow.
-> It's hard to walk away from twill.  I don't know if the following is
-> even feasible but I have to ask.  Since there's a Python interface to
-> spidermonkey (JavaScript) is there any chance for twill to handle
-> JavaScript in the future?

Hi, John, glad you like twill!

First off, I seem to recall that the spidermonkey stuff is (according to
the author) a nearly unrecoverable mess.  I don't have any plans to
integrate it into twill in the near future, partly because of that and
partly because I'd like to keep twill small!  Ideas on this are welcome,
of course.

As for Selenium vs twill: Grig Gheorghiu and I tried out a variety of
testing tools as part of our prep for our PyCon tutorial; we discovered
that twill and Selenium together are pretty complementary.  With twill,
you can test most aspects of the HTTP code, including the asynchronous
stuff that goes on behind the scenes with AJAX.  You can then sprinkle
some Selenium testing on top to test the actual UI.

We spent some time automating our Selenium tests for buildbot; something
that might work really well for you is VNC.  Check out the buildbot
stuff at http://agile.idyll.org/ for more info.

Another option is to try out either Selenium driven mode or the Firefox
Selenium IDE: those will both let you drive the browser remotely.  My
suspicion is that (if Firefox is OK for you) the Selenium IDE is the way
to go.  Check out Grig's blog at http://agiletesting.blogspot.com/ for
some pointers on it.

Finally, you could also check out Watir or PAMIE, both of which drive
browsers.  (I understand that you don't like the browser integration,
but it's really the shortest path in some cases ;).

Hope that helps!


More information about the twill mailing list