I'm giving SWTBot another spin with our e4 application... Out of the box I get a LinkageError when running the wiki example as soon as I install the e4 modeled workbench feature (I tried both 3.6.1 with e4 0.10 and 3.7M2a with 0.11M2):
java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "org/eclipse/ui/testing/TestableObject"
The relevant line in org.eclipse.swtbot.eclipse.core.UITestApplication is the first place the TestableObject facade is used:
I checked out the SWTBot code from Git, played around a bit and discovered that if I make org.eclipse.swtbot.eclipse.core.UITestApplication extend org.eclipse.pde.internal.junit.runtime.UITestApplication and leave the body empty, the test runs and accessing the menu like this does something:
However, it seems that as soon as a dialog opens, it blocks the test. I tried setting a breakpoint at that line above, and the dialog comes up if I step from there, but it does not actually step over that line.
Is that because it's now missing stuff that's not happening in org.eclipse.swtbot.eclipse.core.UITestApplication anymore? Or would it rather be some missing part in the e4 campatibility layer? I discovered bug 296599 but I'm not sure it is actually related.
Any ideas where to look? Would be really awesome to get SWTBot working with e4...
> Is that because it's now missing stuff that's not happening in
> org.eclipse.swtbot.eclipse.core.UITestApplication anymore? Or would it
> rather be some missing part in the e4 campatibility layer? I discovered
> http://bugs.eclipse.org/296599 but I'm not sure it is actually related.
Seems like the right bug. SWTBot uses the same launcher as PDE JUnit
does with some minor modifications. If PDE Junit tests do not work,
neither will SWTBot.
Just curios, do you have any pointers around how e4 is unit tested ?