Introduces how to perform JavaFX interaction tests via TestFX 4. TestFX 4 is still in active development (alpha phase) however it has been for some time now.

source

4 Comments

  1. Hello !
    Nice tutorials covering JavaFx and Spring-Boot.
    But I don't see when the new method bootstrapSpringApplicationContext() is invoqued and how you you set the ConfigurableApplicationContext… May be exemple source code can be found somewhere ?
    Regards

  2. This didn't work for me. The clickOn() method did not correctly click the Button in the method "clickingMissionShouldDisplayOverview()" (although the line was executed without throwing an Exception, so it obviously thinks it did click it).
    NB I checked by means of logging that the text had not been changed.

    When the test executes you can see the JavaFX elements: but they are not properly displayed: there is no proper frame round them. You see the cursor arrow moving to click the button, but in fact it overshoots where the button is (!).

    NB I was not using any kind of Spring framework. Other than that, Gradle, and pretty much exactly what you show us to do. The first method, "clickOnBogusShouldRaiseExcep()" did in fact throw an Exception as intended.

    My verdict: either there is something else I should have done … or TestFX 4 is not currently fit for purpose.

  3. Good vid!
    The class ApplicationTest that is to be extended does not seem to exist anymore, which has halted my progress with this framework. Any ideas?

Leave A Reply

Please enter your comment!
Please enter your name here