leoroos/sandboxdroog — Issue #13: Test Infrastructure
Author: leoroos
Created: 2011-10-18 15:15:34+00:00
State: open

== Test Infrastructure ==

The Tigerseye structure if far from final and often relatively huge refactorings are necessary, additionally many more feature requests exist that will probably again require bigger restructuring.

To ensure that no prior working functionality breaks during that process the bigger part of the available code has to be covered by tests.

=== Requirements ===

Create an Infrastructure that support the following requirements
- It is possible to run all tests from a single start point
- It should be possible to launch the tests from the development environment as well as headless.
- It should be possible to launch arbitrary subsets of test cases

=== Documentation on Plug-in Testing ===

The ''official'' document on realizing automated tests (and builds) is
http://www.eclipse.org/articles/Article-PDE-Automation/automation.html

Different approaches are recommended where to put the test cases for a plug-in:
- (org.eclipse.test) ''Put all tests into one plug-in''
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.test/testframework.html?view=co
- A Blog post describes how to organize tests by putting test units related to a plug-in into a fragment of this plug-in:
http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/
When using the `Eclipse-ExtensibleAPI: true` statement in the `MANIFEST.MF` classes inside the fragments can be accessed from other plug-ins __during development__
The test suites of the fragments can than be called by using a master plug-in fragment that calls the suites via reflection or, with the ''ExtensibleAPI'' activated option, directly.
- The same author also provides an alternative approach using a ''Bundlecollector'' plug-in which collects all tests that fits a description and runs them. http://www.modumind.com/2008/06/12/running-unit-tests-for-rcp-and-osgi-applications/