Headless testing with JavaFX and TestFX (Part2)

preview_player
Показать описание
Shows you how to setup headless functional testing with TestFx 4 and Java FX 8 in a developer IDE (Netbeans 8.1).

Are you tired of waiting around for your functional tests to complete as they take over your mouse and keyboard, thus slowing your progress? With headless testing in place you can let those functional tests run without being interrupted.

This quick tutorial shows you how to switch between headful and headless mode testing via the Netbeans IDE.

Here are the System properties you will need to set (as shown in tutorial)...

If you missed Part 1, here it is ...
Title: Testing JavaFX Applications with TestFX 4 (Part 1)

Other videos worth watching before this one are ...
Title: Spring Boot

Title: Integrating Spring Boot with JavaFX

Title: JavaFX Multiple Controllers

Ask me A Question ...

Subscribe to MVP Java ...

Follow me ...
Рекомендации по теме
Комментарии
Автор

For IntelliJ; Append "-Dheadless=true" (without parenthesis) in VM options, after duplicating the test you wish to run headless.

IvanSkodje
Автор

How can I test components that are not present in the main class, I mean they are in a separate controller with a fxml independent from main class

Jorgehernandez-pkwt
Автор

Is there a way to use a different properties file? My GUI has a web client so I'm considering creating a mock server for it. I wish to create a different properties file ie. application-test.properties for testing purposes.

seungmoon
Автор

Shouldn't the openjfx-monocle dependency have "test" scope?

WimDeblauwe
Автор

<dependency>
<groupId>org.testfx</groupId>

<version>1.8.0_20</version>
<scope>test</scope>
</dependency>

alexweissnicht
welcome to shbcf.ru