[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Monocle in 8u25
From:       Benjamin Gudehus <hastebrot () gmail ! com>
Date:       2014-11-30 9:09:53
Message-ID: CANdUZf-5N_QvD0RjLTcNVGb4CgQatLq=rwnF-HET1FOe8d-Jdw () mail ! gmail ! com
[Download RAW message or body]

A snapshot build (testfx-core-4.0.0-20141130.085021-5.jar) with headless
support (using Monocle for JDK 8u20 and above) is available at [1].

If you run headless mode for TestFX in a desktop environment, add Monocle
as an external jar [2] into your classpath and use the properties:
-Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw

If you've managed to run TestFX in an embedded environment please use:
-Dtestfx.robot=glass -Dglass.platform=Monocle -Dmonocle.platform=Headless
-Dprism.order=sw

It will be also included in the first beta build of TestFX 4
(TestFX-4.0.0-beta.1) coming soon.

[1] https://github.com/TestFX/TestFX/releases
[2] https://github.com/TestFX/Monocle/releases

Regards,
Benjamin


On Thu, Nov 27, 2014 at 11:34 AM, Benjamin Gudehus <hastebrot@gmail.com>
wrote:

> Well, unit tests for the glass robot are finished and the integration
> tests pass now. This PR will be pulled into master very soon. :)
> 
> https://github.com/TestFX/TestFX/pull/159#commits-pushed-11b9b64
> 
> Headless mode in TestFX will be behind the properties:
> -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw
> 
> I decided to keep the AWT robot as default, for compability and
> because the Node.startDragAndDrop() issue is not resolved.
> 
> @Neil:
> > Does that explain what you have seen?
> I'm not quite sure. Thanks for the hint. I'll need to investigate this
> futher.
> 
> 
> On 11/17/14, ngalarneau@abinitio.com <ngalarneau@abinitio.com> wrote:
> > Hi Benjamin,
> > 
> > Your progress sounds very good!
> > 
> > In your email below, you said: "Also I thought that events with
> > Platform.runLater() will be processed first-in-first-out, but it seems
> > that this is not the case."
> > 
> > Kevin, on an email on Nov. 5th to this list, said that the only exception
> > to Platform.runLater() Runnables being processed in order was in the case
> > of a showAndWait() being done. That blocks the current thread, which
> stops
> > the current Runnable from completing while a new thread takes the next
> > event/Runnable from the queue. In that case later Runnables would be
> > processed before the earlier one completes.
> > 
> > Does that explain what you have seen?
> > 
> > 
> > Neil
> > 
> > 
> > 
> > 
> > From:   Benjamin Gudehus <hastebrot@gmail.com>
> > To:     ngalarneau@abinitio.com,
> > Cc:     Tom Eugelink <tbee@tbee.org>, "openjfx-dev@openjdk.java.net"
> > <openjfx-dev@openjdk.java.net>
> > Date:   11/15/2014 10:50 AM
> > Subject:        Re: Monocle in 8u25
> > 
> > 
> > 
> > Small update:
> > 
> > Regarding (2) "requires interactions to be run withing the JavaFX
> thread":
> > Nearly all integration tests for TestFX pass now. However the
> interactions
> > freeze when using Glass robot, Node.startDragAndDrop() and
> > ClipboardContent.putString() together. I guess the timing with
> > Platform.runLater() needs some work.
> > 
> > Regarding (3) "retrieve screenshot images in headless mode": I forgot to
> > use "-Dprism.order=sw". Screenshots work in headless mode.
> > 
> > --Benjamin
> > 
> > On Sat, Nov 15, 2014 at 1:48 AM, Benjamin Gudehus <hastebrot@gmail.com>
> > wrote:
> > You can find the PR for headless support in TestFX here:
> > https://github.com/TestFX/TestFX/pull/159
> > 
> > There are some issues with the Glass robot. We need this robot in order
> to
> > simulate user interactions in headless mode.
> > 
> > One problem is, that the Glass robot (1) requires an JavaFX application
> to
> > be set up. TestFX initializes the robots first and then launches the
> > Application. I worked-around this problem, by initializing the Glass
> robot
> > just before the first user interaction is made.
> > 
> > Another problem is, that the Glass robot (2) requires interactions to be
> > run within the JavaFX thread. From the integration tests I've wrote it
> > looks that we need to wait for the events in the JavaFX thread to
> complete
> > for certain interactions, e.g. we need to wait after mouseMove() in order
> > to do mouseClick(). With the AWT robot we only needed to wait for the
> > events triggered by interactions to complete (let's call them
> > post-interaction events). Now it seems that we also need to wait for the
> > interactions itself to complete, which then will also trigger the
> > post-interaction events. I'll need to visualize different interaction
> > events, post-interaction events and the event waiting, and decide when we
> > need to use the semaphore solution we currently use to wait for
> > post-interaction events. Also I thought that events with
> > Platform.runLater() will be processed first-in-first-out, but it seems
> > that this is not the case.
> > 
> > Yet, another problem is, that I did not manage to (3) retrieve screenshot
> > images in headless mode with the Glass robot. Although it works in normal
> > mode. Maybe the JavaFX event robot can retrieve the screenshots.
> > Interestingly the HeadlessScreen updates it's framebuffer (
> > 
> https://github.com/TestFX/Monocle/blob/0ab3986f4c/src/main/java/com/sun/glass/ui/monocle/headless/HeadlessScreen.java#L117
> 
> > ).
> > 
> > Regards,
> > Benjamin
> > 
> > 
> > 
> > 
> > 
> > 
> > NOTICE from Ab Initio: This email (including any attachments) may contain
> > information that is subject to confidentiality obligations or is legally
> > privileged, and sender does not waive confidentiality or privilege. If
> > received in error, please notify the sender, delete this email, and make
> > no further use, disclosure, or distribution.
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic