Ubuntu – How to run Selenium tests on an Ubuntu server

seleniumUbuntu

I currently have a test machine running Ubuntu server 9.10 with no GUI. I want to run my Selenium RC test suites which open Firefox and perform a series of operation. I could bloat my test server with Gnome or KDE to run those tests but I'm looking for a lighter solution. Does anyone have some suggestions on how to run GUI tests on an Ubuntu server?

Best Answer

Try this for automating headless server stuff. (Caveat, I wrote the post below)

http://www.semicomplete.com/blog/geekery/headless-wrapper-for-ephemeral-xservers.html

Basic summary is I made a script to run any command within a newly-created headless X server. This also lets you run lots of headless X servers at a time if you need to.

So for starting selenium-rc in a new headless X server, you would do (using the tool described in the above post)

sh ephemeral-x.sh -x "Xvfb -ac -screen 0 1024x768x24" java -jar selenium-server.jar ...