Question ad running the "systemTests" module tests ...

Kevin Rushforth kevin.rushforth at oracle.com
Thu Feb 20 13:03:47 UTC 2020


Hi Rony,

None of the apps underneath testapp* are "tests", but are rather 
auxiliary applications that are run as apps in a separate process by a 
test. The test itself must be somewhere under tests/system/src/test/java.

For example, the test class ModuleLauncherTest is in 
tests/system/src/test/java/test/launchertest. You probably need to do 
something similar.

-- Kevin


On 2/20/2020 1:31 AM, Rony G. Flatscher wrote:
> Kevin,
>
> thank you very much for your information!
>
> On 19.02.2020 20:44, Kevin Rushforth wrote:
>> First, make sure that your test class name ends with exactly the string "Test".
> Renamed the class such that it ends in "Test" ("FXMLScriptTest"), however this does not cause the
> class to be loaded from the modular app and its main() method to be run using "./gradlew
> -PFULL_TEST=true :systemTests:test".
>
> All the "systemTests" modular applications (cf. "jfx/tests/system/src/testapp{1..6}") do not contain
> any classes that end in the string "Test"! Rather all the classes that carry out assertions possess
> a main() method that controls the execution and the assertions (usually they extend Application and
> implement the start() method, in which the test methods get triggered).
>
> So that led me to believe that in the case of these system tests the test runner inspects all
> classes and if they contain a main() method just executes it and upon return the launcher inspects
> the return code to determine whether the system test run of that class was successful or not.
>
> When trying to run test classes individually in the system tests, the "--tests" filter comes up with
> an error, e.g. for
>
>     ./gradlew -PFULL_TEST=true :systemTests:test --tests FXMLScriptTest
>
> or for any other of the already existing system tests, e.g.:
>
>     ./gradlew -PFULL_TEST=true :systemTests:test --tests AppFXMLOpened
>
> [The above system test class "AppFXMLOpened" is part of the "testapp6" modular test and located in
> the package "myapp6". Note, the class name does not end in "Test".]
>
> So maybe there is another way to run/launch these system test modular apps (maybe also individually)?
>
> ---rony
>
>



More information about the openjfx-dev mailing list