Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Using Jemmy for e4 javafx application
Using Jemmy for e4 javafx application [message #1403884] Mon, 28 July 2014 12:53 Go to next message
Łukasz Drąg is currently offline Łukasz DrągFriend
Messages: 10
Registered: July 2009
Junior Member
Hi,

following the tutorial at http://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial4 I wanted to create some UI Jemmy tests for my application. Unfortunately when I started jemmy tests with the generated JUnit launch configuration no tests are executed. The application is just stared as with a normal launcher. I found that similar problem was also mentioned in the discussion on the old e(fx)clipse google groups (https://groups.google.com/forum/?fromgroups#!searchin/efxclipse/jemmy/efxclipse/SgVh0vjQAyA/XGOLOKexmScJ) but I am unable to find a proper solution.

BTW. There seems to be a small mistake in the generated launch config. There is a hardcoded line pointing to something like:
/my.app.sample.jemmy/src/my/app/sample/jemmy/TestSuite.java
As you can imagine not everybody names his app "my.app.sample" Wink

I am using Luna with Java8 and added those two to my target platform:
<unit id="at.bestsolution.efxclipse.jemmy.junit.feature.feature.group" version="1.0.0.201407280102"/>
<unit id="at.bestsolution.efxclipse.jemmy.feature.feature.group" version="3.0.0.201407280102"/>

Any help is appreciated

Regards,
Łukasz
Re: Using Jemmy for e4 javafx application [message #1404021 is a reply to message #1403884] Tue, 29 July 2014 07:59 Go to previous messageGo to next message
Łukasz Drąg is currently offline Łukasz DrągFriend
Messages: 10
Registered: July 2009
Junior Member
I managed to go a little bit further with running my tests. I found out that the tests were actually hanging in the "before class" method from OSGiJemmyBootstrapTestCase. I have changed there a small piece of code that waits for an event with topic "efxapp/applicationLaunched" (which in my case never happened) to topic "org/eclipse/fx/E4Application/Launched". With those modifications the test class is finally reached. Unfortunately there still exist some problems. The GlassInputFactory is unable to acquire robot instance due to some threading issues:

java.lang.IllegalStateException: This operation is permitted on the event thread only; currentThread = ActionQueue.queueThread

In the end it leads to a timeout in the test case when I try to e.g. move the mouse:

Action 'Moving mouse to org.jemmy.Point[x=38,y=12]' failed with the following exception:
org.jemmy.TimeoutExpiredException: State 'Waiting for the glass robot to init.' has not been reached in 10000 milliseconds
at org.jemmy.timing.Waiter.ensureState(Waiter.java:121)
at org.jemmy.input.glass.GlassInputFactory.getRobot(GlassInputFactory.java:64)
at org.jemmy.input.glass.GlassMouse$3.run(GlassMouse.java:121)
at org.jemmy.action.Action.execute(Action.java:57)
at org.jemmy.action.ActionQueue$ActionRecord.execute(ActionQueue.java:172)
at org.jemmy.action.ActionQueue$1.run(ActionQueue.java:70)
at java.lang.Thread.run(Unknown Source)


Re: Using Jemmy for e4 javafx application [message #1404024 is a reply to message #1404021] Tue, 29 July 2014 08:25 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5619
Registered: July 2009
Senior Member
Ah yeah we modified the event name - please file a bugzilla! On what
platform are you running?

I'm currently swapped with work that needs to be finished so I was
unable to look into your problem, sorry.

Tom

On 29.07.14 09:59, Łukasz Drąg wrote:
> I managed to go a little bit further with running my tests. I found out
> that the tests were actually hanging in the "before class" method from
> OSGiJemmyBootstrapTestCase. I have changed there a small piece of code
> that waits for an event with topic "efxapp/applicationLaunched" (which
> in my case never happened) to topic
> "org/eclipse/fx/E4Application/Launched". With those modifications the
> test class is finally reached. Unfortunately there still exist some
> problems. The GlassInputFactory is unable to acquire robot instance due
> to some threading issues:
> java.lang.IllegalStateException: This operation is permitted on the
> event thread only; currentThread = ActionQueue.queueThread
>
> In the end it leads to a timeout in the test case when I try to e.g.
> move the mouse:
>
> Action 'Moving mouse to org.jemmy.Point[x=38,y=12]' failed with the
> following exception: org.jemmy.TimeoutExpiredException: State 'Waiting
> for the glass robot to init.' has not been reached in 10000 milliseconds
> at org.jemmy.timing.Waiter.ensureState(Waiter.java:121)
> at
> org.jemmy.input.glass.GlassInputFactory.getRobot(GlassInputFactory.java:64)
> at org.jemmy.input.glass.GlassMouse$3.run(GlassMouse.java:121)
> at org.jemmy.action.Action.execute(Action.java:57)
> at
> org.jemmy.action.ActionQueue$ActionRecord.execute(ActionQueue.java:172)
> at org.jemmy.action.ActionQueue$1.run(ActionQueue.java:70)
> at java.lang.Thread.run(Unknown Source)
>
>
>
Re: Using Jemmy for e4 javafx application [message #1404156 is a reply to message #1404024] Wed, 30 July 2014 05:55 Go to previous message
Łukasz Drąg is currently offline Łukasz DrągFriend
Messages: 10
Registered: July 2009
Junior Member
I am working with 64bit Windows 7
Previous Topic:How to use DnDTabPane example
Next Topic:e(fx)clipse CSS validation questions
Goto Forum:
  


Current Time: Mon Mar 30 04:48:55 GMT 2015

Powered by FUDForum. Page generated in 0.17008 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software