Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Testing Plug-Ins
Testing Plug-Ins [message #465274] Tue, 27 March 2007 22:08 Go to next message
Wade is currently offline WadeFriend
Messages: 2
Registered: July 2009
Junior Member
Hello all,

What are some best practices for developing test suites for plug-ins?

Thanks,
Wade.
Re: Testing Plug-Ins [message #465320 is a reply to message #465274] Wed, 28 March 2007 12:59 Go to previous message
Hugo A. Garcia is currently offline Hugo A. GarciaFriend
Messages: 258
Registered: July 2009
Senior Member
Wade wrote:
> Hello all,
>
> What are some best practices for developing test suites for plug-ins?
>
> Thanks,
> Wade.

Assumming you are using junit and PDEunit and have a source.plugin that
contains the impelementation you are building then:

Create another plugin name source.plugin.test which contains two src
folders (src-junit adn src-pde-unit). Each src folder in your
source.plugin.test will have the same package naming as in source.plugin.

The reason for the separation is that junit test can have access to non
plubic methods (some people test the non public methods) while PDE will
only have access to public methods (due to the usage of different
classloaders in each plugin)

Also, by having your test in a diffrent plugin then come build time it
will be easier to package your application without having the test code
being inlcuded.

If you follow Domain Driven Design and/or Test Driven Development then
it is easy to develop your domain tests in the src-junit folder and test
the integration of your domain with the UI in your src-pde-unit.

This is just a basic approach I use. There are other ways of doing this
but this keeps things simple. I know there are some threads in the lists
discussing the classloader prolbem and you might run into a blog post or
two.

-H
Previous Topic:How to use project explorer in RCP application
Next Topic:editor in perspective layout
Goto Forum:
  


Current Time: Thu Apr 25 10:57:52 GMT 2024

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

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

Back to the top