Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot hanging in Jenkins
SWTBot hanging in Jenkins [message #1232154] Thu, 16 January 2014 05:12 Go to next message
Melwyn Jensen is currently offline Melwyn Jensen
Messages: 14
Registered: January 2014
Junior Member
Hi,

We have integerated successfully SWTBot with Jenkins by following the instruction over here - http://wiki.eclipse.org/SWTBot/Automate_test_execution#On_Jenkins

Now all of sudden after adding few more testcases all of them started hanging in Jenkins. We are able to run the same testcases locally (both Windows and Linux) without any issues but the same hangs in Jenkins.

Tried several things and finally found out that there is something to do with the testcase which we have written. Basically all these testcases are done to check the shortcuts working in table. For eg. Delete key to delete a row, Insert key to insert new row and so on. and during the execution of one of the shortcuts entire eclipse just hangs and in turn whole jenkins build just hangs.

Can someone provide suggestions or possible fix for this issue?

Thanks.
Re: SWTBot hanging in Jenkins [message #1232290 is a reply to message #1232154] Thu, 16 January 2014 11:01 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 741
Registered: July 2009
Location: Grenoble, France
Senior Member
Some things to investigate:
* Do test work on this machine out of Jenkins?
* Do test work with the same X server than the one used by Jenkins?
* Is it always the same operation that cause test to fail?
* Can you see a screenshot, or access the running application to look at
how it is at this time?
....
--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: SWTBot hanging in Jenkins [message #1232663 is a reply to message #1232290] Fri, 17 January 2014 07:57 Go to previous messageGo to next message
Melwyn Jensen is currently offline Melwyn Jensen
Messages: 14
Registered: January 2014
Junior Member
Thanks for your reply Mickael.

* Do test work on this machine out of Jenkins? - Yes.

* Do test work with the same X server than the one used by Jenkins? - Yes.

* Is it always the same operation that cause test to fail? - Yes most of them are with the keystrokes and when I remove that and add another implementation (for eg. instead of Delete keystroke I will select the button delete which works)

* Can you see a screenshot, or access the running application to look at
how it is at this time? - Yes I have Xvnc running in the jenkins, so I can see the tests running live but the minute when it executes the keystroke or the possible step which as the issue the entire eclipse hangs, wherein I cannot even close the eclipse from Xvnc session which I have opened. So the jenkins build just hangs forever unless I manually abort it.
Re: SWTBot hanging in Jenkins [message #1232693 is a reply to message #1232663] Fri, 17 January 2014 09:14 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 741
Registered: July 2009
Location: Grenoble, France
Senior Member
How do you run tests concretely (what interests me is the command-line
or Ant comment or tycho-surefire-plugin configurationi? Did you make
sure the test do NOT run in the UI Thread?

--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: SWTBot hanging in Jenkins [message #1232721 is a reply to message #1232693] Fri, 17 January 2014 10:11 Go to previous messageGo to next message
Melwyn Jensen is currently offline Melwyn Jensen
Messages: 14
Registered: January 2014
Junior Member
Used tycho-surefire-plugin configuration. Below is the complete build configuration used for jenkins,

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<includes>
<include>**/UITestSuite.java</include>
</includes>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<product>org.eclipse.sdk.ide</product>
<application>org.eclipse.ui.ide.workbench</application>
</configuration>
</plugin>
</plugins>
</build>

<useUIThread>false</useUIThread> - should make the test do NOT run in the UI Thread right?

Tycho version used is 0.12.0. Does that have to do anything with this issue? cause I just feel it's problem in runtime during Jenkins build and locally things work fine but the sad part is the same version was used before when all testcases were working in jenkins build Sad

[Updated on: Fri, 17 January 2014 10:13]

Report message to a moderator

Re: SWTBot hanging in Jenkins [message #1234079 is a reply to message #1232154] Tue, 21 January 2014 02:38 Go to previous messageGo to next message
Melwyn Jensen is currently offline Melwyn Jensen
Messages: 14
Registered: January 2014
Junior Member
Hi Mickael,

Found something more with the analysis. The testcase which we are trying to run with SWTBot actually involves testing of keyboard shortcuts within the table. So, found out that when keystrokes like DOWN, DELETE, SHIFT, UP is executed the entire eclipse hangs..

Code used for keystrokes - bot.shell("").pressShortcut(Keystrokes.DOWN);

Is it something known issue with swtbot or so? Any workaround which you can suggest to resolve this? but facing this issue only with jenkins build which am still not sure why it has to happen Sad
Re: SWTBot hanging in Jenkins [message #1234514 is a reply to message #1234079] Wed, 22 January 2014 01:24 Go to previous messageGo to next message
Melwyn Jensen is currently offline Melwyn Jensen
Messages: 14
Registered: January 2014
Junior Member
Found the issue it's with the keystrokes for sure. Replaced DELETE with CTRL + Q in implementation and it started working fine.

Seems to be a limitation in SWTBot. It will be good if the next release have some fix on this as well and also reply from SWTBot Development team will be highly appreciable cause tried mailing them but didn't get reply after sometime.

Thanks.
Re: SWTBot hanging in Jenkins [message #1234745 is a reply to message #1234514] Wed, 22 January 2014 13:09 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 741
Registered: July 2009
Location: Grenoble, France
Senior Member
On 01/22/2014 07:24 AM, Melwyn Jensen wrote:
> Seems to be a limitation in SWTBot. It will be good if the next release
> have some fix on this as well

Did you report a bug on this topic? If so, did you try to write a sample
example to reproduce the issue, automate it as a test, provide a patch...?

> and also reply from SWTBot Development
> team will be highly appreciable cause tried mailing them but didn't get
> reply after sometime.

Your question is related to usage, the swtbot-dev mailing-list is
dedicated to development issues. So it fits better on the forum than on
the mailing-list.
Beware that there is no such "SWTBot Development Team", it's just some
individuals who contribute as they can/want/need to SWTBot. People are
busy, asking them to be more available is generally useless.
Contributors as as much available as they can be.

Cheers,
--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: SWTBot hanging in Jenkins [message #1235320 is a reply to message #1234745] Thu, 23 January 2014 22:48 Go to previous messageGo to next message
Melwyn Jensen is currently offline Melwyn Jensen
Messages: 14
Registered: January 2014
Junior Member
Sorry for my ignorance Mickael, I was under the impression that there is a separate team for SWTBot.

> Did you report a bug on this topic? If so, did you try to write a sample
> example to reproduce the issue, automate it as a test, provide a patch...?

Am afraid if I will be able to create a sample example because as I said earlier the issue is with only jenkins build and not when testing it locally. I just pointed out that it might be a SWTBot issue but still not able to figure out 100% the exact cause for it. Sure will try to pitch in for the fix when I find out the real cause of the problem.

Thanks!

[Updated on: Thu, 23 January 2014 22:50]

Report message to a moderator

Re: SWTBot hanging in Jenkins [message #1235409 is a reply to message #1235320] Fri, 24 January 2014 04:22 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 741
Registered: July 2009
Location: Grenoble, France
Senior Member
On 01/24/2014 04:48 AM, Melwyn Jensen wrote:
> Sorry for my ignorance Mickael, I was under the impression that there is
> a separate team for SWTBot.

No problem, it's not made explicit how and by who the SWTBot project
happens to be developed. And actually, it's not set in stone: it can
change one day.
I believe individual contributors who contribute sporadically to SWTBot
can take the comparison with an organized team as a compliment ;)

> Quote:
>> Did you report a bug on this topic? If so, did you try to write a
>> sample example to reproduce the issue, automate it as a test, provide
>> a patch...?
>
> Am afraid if I will be able to create a sample example because as I said
> earlier the issue is with only jenkins build and not when testing it
> locally. I just pointed out that it might be a SWTBot issue but still
> not able to figure out 100% the exact cause for it.

I believe it could be an issue with the mapping of keys in Xvnc. Some
versions of Xvnc are know to have glitches regarding mouse or keyboard
events.
Maybe you should try it locally using Xvnc. Make sure the local Xvnc is
the same as the one on your CI machine.

Anyway, it's always good to track issues in a bug. It's easier to find
them and it's easier for people to continue discussion. If it happens
that the issue in not in SWTBot, we'll simply explain the cause, close
the bug as NOT_ECLIPSE. No damage will happen.
--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: SWTBot hanging in Jenkins [message #1235481 is a reply to message #1235409] Fri, 24 January 2014 08:28 Go to previous message
Melwyn Jensen is currently offline Melwyn Jensen
Messages: 14
Registered: January 2014
Junior Member
> I believe individual contributors who contribute sporadically to SWTBot
> can take the comparison with an organized team as a compliment Wink

Yea.. that's right I really like the way of ease which SWTBot gives when compared with other Eclipse UI test tools and will be a great compliment for end users like us to see an organized team Smile

> I believe it could be an issue with the mapping of keys in Xvnc. Some
> versions of Xvnc are know to have glitches regarding mouse or keyboard
> events.Maybe you should try it locally using Xvnc. Make sure the local Xvnc is
> the same as the one on your CI machine.

Hmm actually we tried with several other display options like Xvfb, Xephyr and even with that the same issue was there.. Maybe it might be a common problem over there too with the mapping of keys? I really need to check the version of Xvnc in Jenkins machine cause in local Xvnc session the test case passes without any issue. Probably upgrading should do the trick I guess.

> Anyway, it's always good to track issues in a bug. It's easier to find
> them and it's easier for people to continue discussion. If it happens
> that the issue in not in SWTBot, we'll simply explain the cause, close
> the bug as NOT_ECLIPSE. No damage will happen.'

Sure will do that once I cross check and finalize that it's not an display issue.
Previous Topic:How to get the numder of groups in a Dialog
Next Topic:small issue after upgrade to 2.2.0
Goto Forum:
  


Current Time: Fri Aug 22 15:38:49 EDT 2014

Powered by FUDForum. Page generated in 0.01929 seconds