Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
If the web application isn't javascript-heavy then maybe you should consider using Webrat rather than Selenium. You'd benefit from being able to test on headless machines and it's nicer to script and it's much quicker to run tests. – kaerast Jun 6 '10 at 10:55

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

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 -x "Xvfb -ac -screen 0 1024x768x24" java -jar selenium-server.jar ...
share|improve this answer

i haven't tested it by myself, but this sounds promising:

i will try this for myself.

finally i had time to test for myself. i tested it on suse, but should be the same for ubuntu, except perhaps package and path names.

first install xvfb package, on suse it is called xorg-x11-Xvfb

start xvfb in background with display, screen and resolution parameters:
/usr/X11R6/bin/Xvfb :15 -ac -screen 0 1024x768x8 &

change your display settings:
export DISPLAY=localhost:15.0

and start your selenium rc:
/opt/java/bin/java -jar selenium-server.jar > /var/log/se_rc_server.log 2>&1 &

you could also start selenium rc with a testsuite specified:
/opt/java/bin/java -jar selenium-server.jar -htmlSuite "*firefox3" "" "/root/google.ts.html" "/root/google_report.html"

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.