Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot and e4
SWTBot and e4 [message #634652] Fri, 22 October 2010 15:22 Go to next message
Fabian Steeg is currently offline Fabian SteegFriend
Messages: 76
Registered: July 2009
Member
Hi!

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"
	at org.eclipse.swtbot.eclipse.core.UITestApplication.start(UITestApplication.java:51)

The relevant line in org.eclipse.swtbot.eclipse.core.UITestApplication is the first place the TestableObject facade is used:

fTestableObject.setTestHarness(this);

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:

bot.menu("File").menu("New").menu("Project...").click();

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...

Cheers,
Fabian
Re: SWTBot and e4 [message #634792 is a reply to message #634652] Sat, 23 October 2010 15:23 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
On 10/22/10 8:22 AM, Fabian Steeg wrote:

> 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 ?

--
Ketan
ketan.padegaonkar.name | eclipse.org/swtbot | @ketanpkr
Re: SWTBot and e4 [message #634896 is a reply to message #634792] Mon, 25 October 2010 00:00 Go to previous message
Fabian Steeg is currently offline Fabian SteegFriend
Messages: 76
Registered: July 2009
Member
Ketan Padegaonkar wrote on Sat, 23 October 2010 17:23

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 ?



Thanks Ketan - the e4 tests I looked at are at http://dev.eclipse.org/viewcvs/index.cgi/e4/org.eclipse.e4.u i/tests/org.eclipse.e4.ui.tests/
Previous Topic:Configuring a file in SWT test scenario
Next Topic:How to map 3 or more keys to KeyStroke
Goto Forum:
  


Current Time: Fri Mar 29 12:20:27 GMT 2024

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

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

Back to the top