Community
Participate
Working Groups
Creating a bug for a regression sent to me by email. while debugging why our SWTBot based tests don’t run any more (they simply hang after the Eclipse UI starts and the tests won’t get started, see https://hudson.eclipse.org/hudson/job/gmp-graphiti-nightly/560/consoleFull), I stumbled over this Bugzilla (https://bugs.eclipse.org/bugs/show_bug.cgi?id=311979) where you both have done the changes. We (the Eclipse project Graphiti) use a run configuration of type JUnit Plug-in Test for running our SWTBot –based UI tests on the Eclipse Hudson triggered via Buckminster. Since the Buckminster installation is the “Eclipse IDE” which is used to trigger the test run, we can unfortunately not use an SWTBot Test run configuration. While setting up the build I found a guide that recommended to use a JUnit Plug-in Test configuration instead and set the flag Run in UI Thread to false. This worked until we switched to the M7 version. Now I debugged quite a while and saw that UITestApplication used to set the testHarness in WorkbenchTestable (until M6) but in M7 doesn’t do this anymore.
This looks like a regression. Gunnar, can you take a look?
Sorry, forgot to forward you the mail. The SWTBot team knows about this limitation and the special requirement. They actually created their own JUnit launch configuration type for this purpose. They actually recommend not using the PDE JUnit launch config type. http://wiki.eclipse.org/SWTBot/FAQ#Why_do_I_have_to_run_tests_as_SWTBot_tests.2C_instead_of_PDE-JUnit_tests.3F The issue is now getting this type running in Buckminster. It seems that a simple installation using the p2 director should do the trick.
(In reply to comment #2) If I can use a SWTBot run configuration from within the Buckminster installation on the Eclipse Hudson, it would of course solve this for me. But I think that some parts for this are still missing on the SWTBot and/or Buckminster side, or do I miss anything? Do you have more details on that "simple installation"? Michael
*** Bug 341787 has been marked as a duplicate of this bug. ***
There is definitely a regression here, junit tests may not start if the run in UI threads is unchecked. Increasing severity to critical. Gunnar can you please take another look.
Created attachment 192617 [details] Patch for pde.junit.runtime The attached patch fixed the issue. The Non-UI-Thread test application now checks if Platform UI is available and properly install the test harness in this case.
Note, I also verified that non-ui thread tests will be run *outside* the UI thread as well as that true headless tests continue to run without UI in the target platform.
Thanks Gunnar, I will try and look at it today.
Thanks, Gunnar! I applied that patch locally on my machnine and found that this will solve our issue. Michael
Works for me. Fixed in HEAD. On the arch call it was decided to request a rebuild for the fix.
Working properly in the rebuild. Verified.