Run JUnit/TestFX tests against specific JRE


is it possible to specify JRE for JUnit and integration tests (TestFX) execution with Gradle?

For instance, we are using custom JRE to run our product so we would like to run integration tests against that environment.

Assuming that the TestFx task extends the Test task you can set executable property


tasks.withType(Test) {
   it.executable = "path/to/my/jdk/bin/java.exe"
1 Like