Using Squish on headless systems

Last edited on

Introduction

Unix:

Squish can be used on "headless" Unix systems with virtual display software such as Xvfb.

Windows:

We are not aware of any virtual display software for Microsoft Windows, thus the only solution is to use a virtual computer with VMware, VirtualBox and similar technologies. (Also see Automation on Windows .)

Using Squish on headless Unix systems

Here are the required steps for using Squish on headless Unix systems (probably scheduled via cron or other scheduling tools).

Note the use of the two helper shell scripts mentioned below.

Step #1 - Copy/Install Shell Helper Scripts

These two shell helper scripts must be copied to the computer where the AUT (Application Under Test) should be executing.

They start and stop the virtual display, a DBUS session and a window manager for us:

Shell Helper Script Requirements:

Step #2 - Start the virtual display

path/to/startxvfb.sh 8
In a shell

(Replace "path/to" according to your setup.)

Step #3 - Start squishserver on/with that virtual display

DISPLAY=:8 squish_dir/bin/squishserver --verbose &
In a shell

Alternative, more explicit:

export DISPLAY=:8
squish_dir/bin/squishserver --verbose &
In a shell

(Replace "squish_dir" according to your setup.)

(The display number "8" is just an example. Any valid and unused display number can be used. Keep in mind that display number 0 may be used now or later for an interactive login session, and thus should be avoided.)

Step #4 - Execute the test suite

squish_dir/bin/squishrunner --testsuite suite_mine
In a shell

(Replace "squish_dir" according to your setup.)

Step #5 - Stop squishserver

squish_dir/bin/squishserver --stop
In a shell

(Replace "squish_dir" according to your setup.)

Step #6 - Stop the virtual display

path/to/stopxvfb.sh 8
In a shell

(Replace "path/to" according to your setup.)