JavaFX GUI testing with TestFX fails on Github workflow but not on local computer

371 views Asked by At

As per title, I am using TestFX to run some simple test on the GUI of a JavaFX application. The result whenever I run gradle test, will return 340 tests passed out of 340 tests. However, on Github's workflow checks for pull requests, it says 340 tests passed, 1 failed.

> Task :test

seedu.address.ui.WidgetViewBoxTest > update_matchingContent(FxRobot) FAILED
    java.lang.RuntimeException
        Caused by: java.lang.UnsupportedOperationException

340 tests completed, 1 failed

> Task :test FAILED

> Task :jacocoTestReport
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/runner/work/tp/tp/build/reports/tests/test/index.html

Yet locally, everything is fine when I run build.

11:43:12 PM: Executing task 'build'...

> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :startScripts UP-TO-DATE
> Task :distTar UP-TO-DATE
> Task :distZip UP-TO-DATE
> Task :shadowJar UP-TO-DATE
> Task :startShadowScripts UP-TO-DATE
> Task :shadowDistTar UP-TO-DATE
> Task :shadowDistZip UP-TO-DATE
> Task :assemble UP-TO-DATE
> Task :checkstyleMain UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources UP-TO-DATE
> Task :testClasses UP-TO-DATE
> Task :checkstyleTest UP-TO-DATE
> Task :test UP-TO-DATE
> Task :jacocoTestReport UP-TO-DATE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE

BUILD SUCCESSFUL in 0s
16 actionable tasks: 16 up-to-date
11:43:13 PM: Task execution finished 'build'.

I cannot find any relevant issues on the TestFX github page. And the test report generated in index.html indicated 100% text success. Anybody able to provide insights into this issue?

0

There are 0 answers