Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Writing JUnit Tests Against Plugin/Application Components
Writing JUnit Tests Against Plugin/Application Components [message #437985] Mon, 10 October 2005 20:09 Go to next message
Eclipse UserFriend
Originally posted by: bercikr.axiom-logistics.com

Hi,

I am trying to write plug-in tests for some utility classes that
reference the Plugin object, specifically the getBundle() methods. Is there
an example out there how to simulate the runtime of the RCP/plugin
applications for JUnit? I tried to follow the example provided in the
Quality Eclipse books but these don't seem to work in 3.1...

Thanks,
Rob
Re: Writing JUnit Tests Against Plugin/Application Components [message #438045 is a reply to message #437985] Tue, 11 October 2005 18:18 Go to previous message
James E. Ervin is currently offline James E. ErvinFriend
Messages: 9
Registered: July 2009
Junior Member
The only two ways that I know of to approach this are:
i) PDE JUnit ( Along with the headless build)
PDE JUnit will launch a different instance of the runtime workbench and will allow you to exercise a lot of the plugin code with in a functioning container. I have run the JUnit tests that come with the Eclipse SDK ( separate download ) and it is kinda cool to see the tests exercise the workbench and see widgets clicked and closed and so forth.

ii) The mock objects approach.
Very painful and assumes that you know the behavior of the container/workbench so that you mock it out.

I would seriously look at option 1 and download the eclipse test framework and the eclipse automated tests for examples. Remember you can launch PDE JUnit as simply as you launch a set of junit tests from within the workbench.

Good Luck,
James E. Ervin
Previous Topic:Sharing a menu item
Next Topic:access wizard registered in plugin.xml
Goto Forum:
  


Current Time: Sat Dec 07 21:36:27 GMT 2024

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

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

Back to the top