Wednesday, 17 December 2008

Flow Charts (from xkcd)

xkcd is so often amusing but occassionally they post something that quite literally makes me laugh out loud. Today, is one of those times ...


Friday, 5 December 2008

Selenium, give me back my desktop!

Selenium is a great tool for testing web applications but, when running it locally, it does tend to take over your desktop with Firefox windows popping up constantly, leaving you twiddling your thumbs until the test suite is finished.

A beautifully lightweight and simple solution on Linux is to display the Firefox windows under test in an Xnest window.

So, here's my Selenium server startup script:

# Configure the display we'll run Xnest on and the location of the Firefox
# binary.

# Start Xnest and capture its pid.
Xnest $XNEST_DISPLAY -ac &

# From now on we want all X11 apps to start on Xnest's display.

# Let's run a nice, simple window manager on it.
openbox-session &

# Run the selenium server.
java -jar selenium-server.jar -forcedBrowserMode "*firefox3 $FIREFOX_BIN"

# Close the Xnest session.
kill $xnest_pid