Menu

#7 Run tests from within the RCP Application

open
nobody
None
5
2009-01-13
2009-01-13
No

Lets assume an RCP application consists of the feature A, which contains the binary plugins built from your source code, and the Eclipse RCP feature. Furthermore there is a feature A.tests which contains the tests.
The current approach of pluginbuilder is to build feature A first and then RCP application. For testing feature A will be added to a test host using the standalone update manager. The test host is by default identical with the build host. However you can define something more reduced, e.g. the Eclipse platform. In any case the test host is required to contain the update manager. In addition to feature A pluginbuilder installs A.test and a test runner and its dependencies (this can either be the Eclipse test framework or the autotestsuite). Then it runs the tests by starting a test application in the test host.

This approach is sufficient for most cases. However, since the test host usually contains more plug-ins than your RCP application, it can behave differently. E.g. there will be more menu entries. This can be annoying if you run UI tests (like abbot tests).

To get better results pluginbuilder could build the RCP application first, extract it and add the minimun set of features to the RCP application. Then the tests would be started by running the test application. The RCP application can further be given as argument to the test application so that the workspace will be configured correctly before the tests start (e.g. the correct perspective is chosen).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.