javamavenjavafxtestfx

Maven Surefire Plugin is not executing integration tests using TestFX properly


I have an JavaFX Application that uses TestFX as testing framework. Unfortunately, when executing the tests in headless mode (with the options -Dtestfx.robot=glass -Dglass.platform=Monocle -Dmonocle.platform=Headless -Dprism.order=sw) via mvn test (using the Maven Surefire Plugin), the JavaFX application does not start and the test runs indefinitely, whereas when executing them in non-headless mode, all tests pass. I don't even receive any exceptions or error messages.

When executing the tests via the IDE (I'm using IntelliJ), the tests also work in headless mode.

I am using Java 11 and Maven 3.6.3. The Surefire Plugin is on the latest version (3.0.0-M4).

Any ideas on this issue?


Solution

  • Updating the Surefire Plugin's version worked for me as well as updating Maven.