GUI code testing for JDK 10/11 - Keys, Mouse, TestNG, Maven, etc.
mike.ennen at gmail.com
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 11com.sun.glass.ui.Robot was moved to the public API as
javafx.scene.robot.Robot so it is now easier to use the built-in Robot to
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
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
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
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.
On Tue, Aug 28, 2018 at 2:42 PM Miroslav Nachev <
mnachev.nscenter.eu at gmail.com> wrote:
> What are the possible options for GUI code testing for JDK 10/11?
> I tried TestFX <https://github.com/TestFX/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.
More information about the openjfx-dev