GUI code testing for JDK 10/11 - Keys, Mouse, TestNG, Maven, etc.

Michael Ennen mike.ennen at
Tue Aug 28 22:49:40 UTC 2018


I am the current maintainer of TestFX and a (new) contributor to OpenJFX
on this exact area. TestFX does support Java 10. We are currently working on
supporting Java 11, as can be seen here:
In JavaFX was moved to the public API as
javafx.scene.robot.Robot so it is now easier to use the built-in Robot to
test a
JavaFX GUI application.

TestFX offers some nice conveniences on top of the base Robot (namely,
a nice way to target specific nodes in the scene graph and assert on their
expected states).

In summary, TestFX will soon support JavaFX 11. You can use the public API
Robot if you do not wish to use TestFX. TestFX does not currently support
TestNG - a contribution in that regard to TestFX would be great. You can see
the sub-projects for Junit 4/5 are quite small:

Although things are in a state of flux with regards to how the JUnit
work with respect to Jan Ortner's work in
Therefore if you were interested in contributing TestNG support to TestFX
it would
be advisable to base the work off of Jan Ortner's work in 615.

Also, I should mention, that the basic robot functionality for Glass has
around since before Java 8 and could always be used, although it was a
API so any code written for it could break at any time. Now that it is part
of the
public API that is no longer a concern.

I should also mention that it is possible to use the AWT Robot with JavaFX
bypass the JavaFX Robot entirely.

Michael Ennen

On Tue, Aug 28, 2018 at 2:42 PM Miroslav Nachev < at> wrote:

> Hi,
> What are the possible options for GUI code testing for JDK 10/11?
> I tried TestFX <>, but this project does
> not support JDK 10/11. Additionally, it does not support TestNG. I do not
> want to use JUnit, because it does not have the necessary functionality,
> such as ordered/sorted execution of the methods in each class.
> Regards,
> Miro.

More information about the openjfx-dev mailing list