Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Problems with SWTBot and Spring-Context
Problems with SWTBot and Spring-Context [message #515811] Sun, 21 February 2010 10:25 Go to next message
Stefan Hartung is currently offline Stefan HartungFriend
Messages: 3
Registered: July 2009
Junior Member
Hey,

in our RCP-project we use Spring DM.

For normal Unit-Tests everything works fine, but if we test the GUI with SWTBot there is a problem with the Spring-Context. It seems to me that that the context can't be loaded.
and i don't know where the problem is. If the bot opens Views with no Spring-context in it, everything is allright.
We use the SpringExtensionFactory from Martin Lippert.

Does anybody do tests with SWTBot and Spring?

Greetings,

Stefan
Re: Problems with SWTBot and Spring-Context [message #515858 is a reply to message #515811] Sun, 21 February 2010 20:49 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
I'm not sure what Spring DM does. You may want to compare the
MANIFEST.MF and plugin.xml of your swtbot test plugin and a normal test
plugin which works for you.

However we use good ol' Spring to run our SWTBot tests, it's a bit tricky.

To use spring with swtbot we added a RegisterBuddy header in the
manifest file of our test plugin:

Eclipse-RegisterBuddy: org.springframework

Cheers!

-- Ketan

On 2/21/10 3:55 PM, Stefan Hartung wrote:
> Hey,
>
> in our RCP-project we use Spring DM.
> For normal Unit-Tests everything works fine, but if we test the GUI with
> SWTBot there is a problem with the Spring-Context. It seems to me that
> that the context can't be loaded.
> and i don't know where the problem is. If the bot opens Views with no
> Spring-context in it, everything is allright. We use the
> SpringExtensionFactory from Martin Lippert.
> Does anybody do tests with SWTBot and Spring?
> Greetings,
>
> Stefan
>
Re: Problems with SWTBot and Spring-Context [message #516279 is a reply to message #515811] Tue, 23 February 2010 13:39 Go to previous message
Stefan Hartung is currently offline Stefan HartungFriend
Messages: 3
Registered: July 2009
Junior Member
Hm, the Buddy-Policy didnt work.

I found a tutorial, where i register a Spring-Bundle, containing all libraries, as a buddy to my SWTBot-Test-Plugin.
That didn't work,too.

My next try was to copy the application-context from my GUI-Bundle to a new application context within my Test-Plugin. But now i
get an Illegal argument exception that noch classloader could be found for the test-plugin.

I forgot to mention that we use the SpringExtensionFactory to inject our dependencies into the views.

The thing i dont understand is, SWTBot starts the product itself. Where is the problem to load the contexts from the product or
even to start the product with with its own product-configuration???
Previous Topic:Test Recorder
Next Topic:Setting a new value in a treeItem.cell
Goto Forum:
  


Current Time: Fri Apr 26 20:30:33 GMT 2024

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

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

Back to the top