Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Oliver Kopp
@koppor
Maybe you have time experiencing to delete some jars in the archive ^^
BrsDreamer
@BrsDreamer
well actully im saying the 170 Based on Javafx inside jdk like befor oracle decided To Throw it away so was wondering if community Doing better job at updating and Maintaining it
so came to ask if the openjfx Is any better at size but guess not ^^
and do exceuse me for asking but May i ask exactly how much size where talking when you say "fat jar" on the new javafx openjfx?^^
Oliver Kopp
@koppor
the portable zip went up from 220 MB (https://builds.jabref.org/chocoDev/) to 350 MB (https://builds.jabref.org/master/). Side node: Before including the JRE (and just using Install4J), it was 65MB (https://builds.jabref.org/sharelatex/).
BrsDreamer
@BrsDreamer
my god are u for real thats even worst when it was on the jdk
right now javafx i think it's even worst than that electron framework
like literally
i heared the community is working on it non stop but with this phase that there going i think there gonna overlook even the most basic parts of framework
it's Size !
Sinus37
@Sinus37
hey guys. i am pretty new to testFX (started this morning) and i am having trouble with treeviews
how would i access the treeitems which are located in a second window opened from the main window
nothratal
@nothratal
Hello together
shlomi tubul
@shlomitubul
hi
did someone familiar with pom style with testfx ?
shlomi tubul
@shlomitubul
any code examples / docs will appreciate
Kevin Turner
@keturn

Hi folks. I'm trying to test a javafx.concurrent.Task under junit5.

Using @ExtendWith(ApplicationExtension.class)lets my Task's call() method run, which is much appreciated, as it silently failed to do that before using TestFX.

1 reply
Problem is that exceptions from there vanish and I'm totally failing to find them. passing the task to asyncFx instead of the ExecutorService I was using didn't help. WaitForAsyncUtils.checkException() returns without incident.
With my debugger I'm managed to track them as being re-thrown from the javafx TaskCallable.call try/catch, and I have no idea where they go after that.
Kevin Turner
@keturn
Thread.getDefaultUncaughtExceptionHandler says WaitForAsyncUtils$lambda@3681, I'm not sure how to resolve that to a source location.
and no, they don't get raised when the calling thread does .get() on the Future.
Kevin Turner
@keturn
TestFX/TestFX#615 looks like it is perhaps relevant to my interests but it looks like the author got pulled away before it could be merged.
Kevin Turner
@keturn
I think a RunnableAdapter is what does it
Kevin Turner
@keturn
I don't really understand what's going on, this is in private Executor code? but this jerk seems to be running the task and then ignoring the fact that it failed
Kevin Turner
@keturn

okay. so it gets eaten and hidden from the synchronous stacktrace, as well as the Future.get().

but it stores things in its properties. that it only allows access to from the Application Thread. How do I make assertions on them.

Kevin Turner
@keturn
like this, I guess?
    assertNull(WaitForAsyncUtils.waitForAsyncFx(100, myTask::getException));
Kevin Turner
@keturn
that's uncomfortably verbose just to make sure that my test doesn't pass if the code under test throws an exception
Kevin Turner
@keturn
in fairness to TestFX, if I understand this right, this isn't exactly a TestFX problem. I ... I don't think I understand whose problem it is. Maybe javafx's Task? Maybe core openjdk?
Kevin Turner
@keturn

oh dear. okay. waitForAsyncUtils.asyncFx returns a Future. But it's a Future<Void>. You can .get() it! The API docs tell you to!

however, since it's Void, that's not actually the result of your Task.

but because the Task is itself a RunnableFuture, you can also Future.get() that.

and then its exceptions pop out.

Jochen Reinhardt
@JochenReinhardt
Hi folks, I am looking for a way to open a context menu with a right click on a label and select a menu item (identified by id). But I'm struggling.
It works fine in the UI, but with headless TestFX i'm not sure of the state and what the problem actually is.
How can I find the context menu? How to make sure it is actually shown? How to find a menu item inside?
Is there some example code for dealing with a context menu?
As far as I understand it should be visible in the list of target windows as it is a PopupWindow. But the only window is my application window.
Am i missing something?
Jochen Reinhardt
@JochenReinhardt
In a simple example, i can just wait for the context menu to become present, then click on an entry. Works fine.
But in my actual application, the label is used as part of a custom list cell.
Jochen Reinhardt
@JochenReinhardt
my test application fails, too - in headless mode :(
Trevor Flynn
@tlf30
Hello everyone, I am trying to do integration testing on an application that utilizes JavaFX 11 in a custom rendering environment (AKA, there is no 'Application' class). I have been running into the issue that FXML controller @FXML fields do not get populated. After some research it looks like the reflection that javafx performs does not work in junit 5 correctly due to the jfx threads not being loaded (I think). Some googling later found TextFX, and am wondering if I can use it to setup the jfx env for my integration tests so that this application will correctly load the FXML controllers.
2 replies
RahKnee
@RahKnee

I'm running some TestFx test cases that work fine in my local for headless mode and headful mode but for some reason when the same test runs in jenkins in headless mode only I receive the following message on lines where some buttons are clicked.

java.lang.RuntimeException: org.testfx.service.locator.BoundsLocatorException: bounds are not visible in Scene

Does anyone know why this would happen?

These are my headless properties....

testfx.robot", "glass"
"testfx.headless", "true"
prism.order", "sw"
prism.text", "t2k"
headless.geometry", "1600x1200-32

resixx
@resixx
Hello! Please help me, I can't build testfx, returns: failed testfx-core: checkstyleMain.
why might this be happening? Thank you in advance!
resixx
@resixx
Thank you, the question is cleared. There was a bug in the code.
bart-ch
@bart-ch
Hey, do you know what can be source of the error I'm still getting?
I cant even run a test class which the framework creator put in description:
"--- Exception in Async Thread ---
java.lang.IllegalAccessError: class org.testfx.toolkit.impl.ToolkitServiceImpl (in unnamed module @0x5d8b79d5) cannot access class com.sun.javafx.application.ParametersImpl (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.application to unnamed module @0x5d8b79d5"
nidhibudhraja
@nidhibudhraja
how do I read testcases froma csv for testfx tests?
Kiyan Nan
@NanJerry
When I run testFX, the press trigger twice. I wonder know why this may happen.
JimmySimard
@JimmySimard
Hi !! Is it possible to run testfx with cucumber and junit 5 ?
3 replies
kayFpunkt
@kayFpunkt
Hey everyone. I love TestFX and use it for my UI tests. Actually I use it in combination with TornadoFX, Cucumber and JUnit5. Its working properly with a little workaround. Only one point I can't do. Restart the application within a Scenario. I stop the application and start it again. but then my UI is not loading any internal views.
Hu1buerger
@Hu1buerger

Hey yall. I am migrating an ant project to gradle. I am uncertain which testFx is used. Therfore i tried all that i found on maven. But i am running gradle with

testCompile group: 'org.testfx', name: 'testfx-core', version: '4.0.1-alpha'
testCompile group: 'org.testfx', name: 'testfx-junit', version: '4.0.1-alpha'

But i am getting either

error: cannot access Predicate
public class ClassIdentifierTest extends ApplicationTest implements Closeable {
^

or

error: cannot access ApplicationFixture

The issue dosnt seem to be documented on the internet or the README

2 replies
kayFpunkt
@kayFpunkt

Hey everyone. I love TestFX and use it for my UI tests. Actually I use it in combination with TornadoFX, Cucumber and JUnit5. Its working properly with a little workaround. Only one point I can't do. Restart the application within a Scenario. I stop the application and start it again. but then my UI is not loading any internal views.

I think my problem is that not all FX threads really closed. So my question is how to restart the application again correctly within a test. I have a lambda

startApp : (() -> (Unit)) -> (Unit) = { beforeLambda ->
            beforeLambda.invoke()
            primaryStage = FxToolkit.registerStage { Stage() }

            ApplicationTest.launch(MyApp::class.java, applicationVargs)
}

and a lambda to stop it :

stopApp : (() -> (Unit)) -> (Unit) = {
            FxToolkit.cleanupStages()
        }

If i run inside my test stopApp.invoke() and then startApp.invoke() then a second window is open and the test try to access the previous window.
How I am able to force closing and launching again?