2

I am creating a game with JavaFX with a team. Everything is going fine, except for one thing. We have created an automated GUI test, which we got to run on travis by running an Xvfb display:

before_install:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"

However, this display does not support 3D. In the Travis log, there are literally thousands of lines saying the following:

WARNING: System can't support ConditionalFeature.SCENE3D
Sep 15, 2015 11:16:00 AM javafx.scene.shape.Shape3D <init>

Having thousands of warnings spammed in the log doesn't affect any of our tests. But when we added a bunch more objects, Travis cut off our build because the log file was getting too long:

WARNING: System can't support ConditionalFeature.SCENE3D
Sep 15, 2015 11:16:00 AM javafx.scene.shape.Shape3D <init>

The log length has exceeded the limit of 4 Megabytes (this usually means that test suite is raising the same exception over and over).

The build has been terminated.

Question: Does anyone know a way to support 3D on these kind of headless GUI tests? Alternative: How to turn off these Warnings so that the log file won't become this long?

If more information is needed to answer this question, please ask! :)

1 Answers1

0

One way could be to make sure (either in your code or in your test) that only that code is executed that is supported:

http://docs.oracle.com/javase/8/javafx/api/javafx/application/Platform.html#isSupported-javafx.application.ConditionalFeature-

Puce
  • 37,247
  • 13
  • 80
  • 152