Article - Using Squish on headless systems

Skip to end of metadata
Go to start of metadata

Table of Contents

Introduction

Unix:

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

Without an X server and without one of the aforementioned solutions the following error may be shown when starting your application through Squish (squishserver):

[...] AUT stderr (5202390009): MyAUT: cannot connect to X server.

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, Virtual Box 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:

  • xvfb
  • xfwm4

Step #2 - Start the virtual display

In a shell

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

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

In a shell

Alternative, more explicit:

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

In a shell

(Replace "squish_dir" according to your setup.)

Step #5 - Stop squishserver

In a shell

(Replace "squish_dir" according to your setup.)

Step #6 - Stop the virtual display

In a shell

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

Labels:
headless headless Delete
unix unix Delete
linux linux Delete
virtual virtual Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.