Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBOT - WINDOWS - Jenkins - Eclipse losing focus
SWTBOT - WINDOWS - Jenkins - Eclipse losing focus [message #968952] Fri, 02 November 2012 22:07 Go to next message
suresh nallamilli is currently offline suresh nallamilliFriend
Messages: 4
Registered: May 2012
Junior Member
I configured Jenkins to run SWTBOT tests periodically i.e. Jenkins automatically runs tests twice a day.

When i execute tests manually everything works fine.
However if tests are initiated from Jenkins timer i am seeing 30% failures with error saying
"Widget is null or Could not find wizard or Widget is disposed".

So it is clear that these errors are occurring since eclipse is losing focus , does any one has any idea on how to keep eclipse active during test runs?
Re: SWTBOT - WINDOWS - Jenkins - Eclipse losing focus [message #973368 is a reply to message #968952] Tue, 06 November 2012 09:21 Go to previous messageGo to next message
Ramesh D is currently offline Ramesh DFriend
Messages: 17
Registered: January 2012
Junior Member
Hi,

If you are running Jenkins from windows, do not run jenkins as a windows service.

This will solve your issues.

-Ramesh
Re: SWTBOT - WINDOWS - Jenkins - Eclipse losing focus [message #981356 is a reply to message #973368] Mon, 12 November 2012 10:56 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 771
Registered: July 2009
Location: Grenoble, France
Senior Member
On 11/06/2012 10:21 AM, Ramesh D wrote:
> Hi,
>
> If you are running Jenkins from windows, do not run jenkins as a windows
> service.
> This will solve your issues.

Thanks, I've added a note to documentation to help future users:
http://wiki.eclipse.org/SWTBot/Automate_test_execution#Windows_hints_2
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: SWTBOT - WINDOWS - Jenkins - Eclipse losing focus [message #1037937 is a reply to message #981356] Wed, 10 April 2013 07:44 Go to previous messageGo to next message
Christoph Zwirello is currently offline Christoph ZwirelloFriend
Messages: 8
Registered: July 2012
Junior Member
When I run Jenkins standalone, an instance of Eclipse will pop up during the swtbot test while nothing will pop if Jenkins is started as a service. Something having to do with the display is different in the service scenario, but I don't see how you can deduct that it has to do with focus.

In my case, nearly all my tests run just fine when Jenkins is started as a service, except the following code:

...
SWTBotTreeItemExtension readSchemaProperty = 
  new SWTBotTreeItemExtension(readProperties.getTreeItem("Schema").widget, readProperties.widget);
readSchemaProperty.click(1);
readSchemaProperty.click(1);
readSchemaProperty.pressShortcut(Keystrokes.DOWN);
...


It's the only place in my tests where I use Keystrokes, so that might be it. And I must admit that keystrokes wouldn't work if the respective view lost focus, but is this really the issue here? And if it is, is there any other workaround than running Jenkins as a standalone application?

chris
Re: SWTBOT - WINDOWS - Jenkins - Eclipse losing focus [message #1038746 is a reply to message #1037937] Thu, 11 April 2013 09:01 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 771
Registered: July 2009
Location: Grenoble, France
Senior Member
I think this issue youy have is not related to focus, at in case of lost
focus, even the .click() would fail.
Does this test run well on your local development machine?

--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:How to click on toolbar dropdown menu item using SWTBOT
Next Topic:Example for Drag and Drop
Goto Forum:
  


Current Time: Sat Dec 20 18:04:54 GMT 2014

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

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