0

Environment

I'm currently trying to run JavaFX GUI tests via xvfb on multiple environments on Travis CI. I'm using Gradle to run these tests while using the TestFX and NestedRunner testing frameworks to write them. Before running the tests, export DISPLAY=:99.0 is called.

Context

There are times when the build succeeds and other times when it fails. However, I've noticed that Gradle outputs a single line that I can use to predict when the build will succeed or fail.

Before that line appears, one will see the following in the Travis CI log:

:richtextfx:compileJava
:richtextfx:processResources
:richtextfx:classes
:richtextfx:compileTestJava
:richtextfx:processTestResources
:richtextfx:testClasses

After that, one of two lines appears that predicts whether the build will succeed/fail:

  • on success: :richtextfx:testXlib: extension "RANDR" missing on display ":99.0".
  • on failure: :richtextfx:test

My Question

Why does Gradle change the test task to testXlib task? What are the inner mechanisms that handle this? And what does it all mean?

Vampire
  • 35,631
  • 4
  • 76
  • 102

1 Answers1

0

Gradle for sure does not do this. I've never heard of a task called testXlib and also the complete Gradle source does not contain this character sequence.

Either your build script does this, or some plugin you apply, or an init script that is applied by Travis CI.

Try to increase the logging level to debug and also add a call to tasks --all, maybe that will shed some light.

Vampire
  • 35,631
  • 4
  • 76
  • 102
  • I just realized what's actually going on here because of your comment. Thanks! gradle is running `:project:test` irregardless. However, it uses `print`, not `println`, to do this. So, the next thing that gets printed appears immediately after the test. Thus, it's actually printing `Xlib: extension "RANDR" missing on display ":99.0"` immediately after it prints `:project:test` –  May 24 '17 at 05:23