- Loading...
...
Currently all of the Robot based tests are in systemTests, and must live in the test.robot package.
Often a single test can be run for debugging using the --tests option to gradle:
gradle -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests test.robot.javafx.embed.swing.RT32570Test
In this example, we want to run a single test in systemTests, which needs to be enabled with FULL_TEST
...
Each of the build modules in OpenJFX has an addExports file that is imported using @argfile into the test invocation. The addExports file contains entries that export packages that are not public so that the unit tests in the unnamed module can see them. Here is an excerpt from one of the files:
...
-XaddExports:
...
javafx.base/com.sun.javafx.collections=ALL-UNNAMED
...
-XaddExports:
...
javafx.
...
base/com.sun.javafx.
...
property=ALL-UNNAMED
-XaddExports:javafx.base/com.sun.javafx=ALL-UNNAMED
...
-XaddExports:
...
javafx.
...
base/com.sun.javafx.
...
event=ALL-UNNAMED
...
And example error, that indicates a missing export:
...
For our current JUnit tests, this only applies to the Sandbox tests in :systemtests. To permit the Xpatch classes to operate properly, we generate a java.policy file for the core FX classes in the Xpatch modules. This java.policy file (build/testing/java.patch.policy) can be used standalone if no additional permissions are needed, or must be combined with the desired additional permissions to form a single java.policy file. The Sandbox tests combine the permissions in the text file indicated by the property worker.patch.policy with the test permissions, and use the resulting file when invoking the test app.
...
The following is an example command line that can run a junit test from within a built Linux OpenJFX modular tree. This can be useful when debugging a single test class:
...