DEV@cloud » Testing GUI applications

Testing GUI applications

Last modified by Ivan Meredith on 2011/10/10 20:03

Overview

In order to perform UI testing your applications on DEV@cloud, you may need to have an X11 windowing server installed.

There are several ways to acquire this X11 display

DEV@cloud support

DEV@cloud supports the second of these options directly using the Xvfb application.

Xvfb is deployed into the build executors and just needs to be started to be available for your application.

Starting Xvfb

export DISPLAY=:1
Xvfb :1 &
... gui code / tests ...

Troubleshooting

If you get an error similar to the following it means that you haven't started Xvfb properly.

Caused by: java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:432)
at java.awt.Frame.<init>(Frame.java:403)
at java.awt.Frame.<init>(Frame.java:368)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1733)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1810)
at javax.swing.JDialog.<init>(JDialog.java:253)
... thousands more ...
Tags:
Created by Ben Walding on 2011/07/19 22:07