Sometimes your are not able to extend your application by plug-ins and you have to make changes to the Eclipse code itself. In this case you should use the existing Eclipse JUnit tests to validate your changes. I’m currently working at the JFace Bundle so I’m trying to take advantage of the existing JFace unit tests (currently 966).
The unit tests for the JFace Bundle are placed in the org.eclipse.ui.tests plug-in. This plug-in includes also several other tests for the plattform.ui.
To run this tests also the following plug-ins are needed:
- org.eclipse.core.tests.harness from the eclipse.platform.runtime repository
- org.eclipse.core.tests.runtime from the eclipse.platform.runtime repository
org.eclipse.test.performance from the eclipse.platform.releng repository
- org.eclipse.ui.tests from the eclipse.platform.ui repository
- org.eclipse.ui.tests.harness from the eclipse.platform.ui repository
Just clone this repositories and import the plug-ins into your workspace.
It is also required to have a API Baseline configured. You do this by Window > Preferences > Plug-in Development > API Baselines
In my case I added the Baseline of my current Kepler installation.
To test the full JFace TestSuite, you only need to run the “JFace-All Tests.launch” run configuration from the org.eclipse.ui.tests plugin.
After the run, the testresults hopfully look like in the following screenshot