Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Unit tests on a e4 Application.
Unit tests on a e4 Application. [message #1001270] Wed, 16 January 2013 11:08 Go to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
I would like to test several functions in my e4 Application, by using JUnit tests.

There are many e4 Objects Injected into this method, the injected objects require other e4 objects and so on.

So I need the e4 Application to be started, bevore the test, in order for all that transitive depepndencies to be sattisfied.


Is there a possibility to start the e4 Application, bevore the Test is started?
Re: Unit tests on a e4 Application. [message #1001287 is a reply to message #1001270] Wed, 16 January 2013 11:56 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Have a look at SWTBot http://www.eclipse.org/swtbot/
This is definitely what your are looking for.

Unfortunately there are still some issues regarding e4. I think you can find out about those issues at their wiki or documentation somewhere. But they are definitely working on those issues at the moment.
Re: Unit tests on a e4 Application. [message #1001800 is a reply to message #1001270] Thu, 17 January 2013 11:45 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 01/16/2013 12:08 PM, Alex Kipling wrote:
> Is there a possibility to start the e4 Application, bevore the Test is
> started?

You'll probably face a critical issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=296599 . This makes almost
impossible to test e4 applications with PDE.
However, there is no problem if you use Tycho. You can set the
application argument of Tycho-surefire-plugin to your e4 application,
and make sure the e4 bundles and your application are in the
classpath/dependencies. Then your test plugin will work well.

HTH
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:Getting e4-service from OSGi-service
Next Topic:Putting a PerspectiveStack on a Part
Goto Forum:
  


Current Time: Thu Mar 28 19:12:02 GMT 2024

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

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

Back to the top