[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Writing JUnit Tests Against Plugin/Application Components

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