Yesterday I tried to introduce continuous integration for JFXTras using Travis-CI.

The JFXtras project uses gradle as its build tool, so using Travis for CI wasn't more difficult than just:
After few minutes Travis started a build that performed well until a test failure...

Digging into the log file there was the following

... Failed in XOpenDisplay
... Gtk-WARNING **: cannot open display:  

In fact, JFXtras tests use Jemmy to realize GUI tests. So the build process has to be headfull and not headless. So we need an X environment !!!

After a quick google, I found this blog post.

As a result the .travis.yml file was changed to

language: java
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
jdk:
- oraclejdk7

Travis build could then perform the GUI tests correctly and build status became green again !