My application uses eclipse/rcp and consists of several rcp plugin
projects. Some plugins are gui and others are non-gui. A single plugin
may reference other plugins.
My first step is to implement the junit in a rcp plugin project.

Now, google search found some interesting tools: tptp agr and swtbot.
Some comercial project are found, too. But my interest in costfree tools.

questions:

1. The tptp automated gui recorder sounds good, but the documentation is
very rare. The docs i found seems to be for an older version of eclipse.
I am not sure how to control this tool :-(

Any idea?

2. SWTBOT, the docs seem to be more complete but i havent used it. Do
you think it is a worthful alternative to tptp?

On question 4: My first shot for simple rcp testing was to just write a
little IApplication that runs all the tests..
and put it in a fragment of your plugin under Test so you get full
access to all classes in the plugin.

Ceeper a écrit :
> 2. SWTBOT, the docs seem to be more complete but i havent used it. Do
> you think it is a worthful alternative to tptp?

I am a big fan of SWTBot, and I think it is worth trying. It makes writing user-level tests very easy. Moreover, it can be integrated in headless unit tests suite as easily as simple JUnit tests.

> How do you implement junit tests for rcp based applications?

Simply write some JUnit plugins tests (ie JUnit tests that have access to Eclipse runtime, UI and workbench classess). When writing them you can launch them from Eclipse as you would run simple JUnit tests.
If you want to test them in your built RCP application, you'll have to:
* Provide test, and dependency and Eclipse test framework in your application (for example as an additional feature).
* Run your test headless from inside of your application using the org.eclipse.test.uitestapplication (see http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html)
The difficulty here is to provide right dependencies so that your test will start.