Max,

I think you are not supposed to click anywhere when window tester is running your app or it never got the focus when started from the unit tests.

http://www.instantiations.com/forum/viewtopic.php?f=5&t=1921&start=0&st=0&sk=t&sd=a
 http://www.instantiations.com/forum/viewtopic.php?f=5&t=1874&p=6737

 You could also try to add something like this to your test:
ShellFinder.bringRootToFront(getActivePage().getWorkbenchWindow().getShell().getDisplay());

Also, to see what it is doing when it hangs you need to find pid for jvm spawned for the test workbench (e.g. using jps command) and then use kill -QUIT <pid> command to force the thread dump from that process. See http://docs.codehaus.org/display/M2ECLIPSE/Project+FAQ#ProjectFAQ-Howtogenerateathreaddump

 regards,
 Eugene


Max Spring wrote:
I have a unit test which uses WindowTester to launch an Eclipse workbench, do some GUI action and then close the workbench again.
The test case executes fine when launched from a PDE.
I want to launch this test case with Tycho (on Linux).
With Tycho no workbench shows up and the test case seems to hang.
As soon as I click anywhere, I get the exception shown below.
I'd be very thankful for any clue about how to tackle this.
-Max

com.windowtester.runtime.swt.finder.UnableToFindActiveShellException
at com.windowtester.finder.swt.WidgetFinderService.collectMatchesIn(WidgetFinderService.java:81) at com.windowtester.finder.swt.WidgetFinderService.collectMatches(WidgetFinderService.java:69) at com.windowtester.finder.swt.SWTWidgetFinder.findAll(SWTWidgetFinder.java:70) at com.windowtester.runtime.WidgetLocator.findAll(WidgetLocator.java:429) at com.windowtester.runtime.swt.internal.UIContextSWT.findAll(UIContextSWT.java:498) at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:433) at com.windowtester.runtime.swt.locator.MenuItemLocator.click(MenuItemLocator.java:88) at com.windowtester.internal.runtime.selector.ClickHelper.doClick(ClickHelper.java:178) at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:65) at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:83) at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:280) at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:76) at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:288) at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:69) at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:271)
       at com.cisco.surf.junit.test.MailTest.testMail(MailTest.java:21)



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to