At castor meeting in Vienna we discussed about test framework for Castor persistence. We decided that the new test framework should allow test cases to be executed with junit out of the box and rely on junits mechanism to collect all tests within a package. The test framework have to provide some means to exclude tests from being executed for specific database engines. This should be achived at collection of test methods in the test cases suite method. Apart of the exclusion mechanism the test case need to provide a unique identity and a description.
Even if it will be posible to execute tests without parameters, should it also be possible to pass some parameters:
- database: The database to execute the tests with (e.g. mysql)
- driver: The database driver to be used (e.g. datasource)
- transaction: The transaction demarcation to be used (e.g. local)
- force: Force test execution even if excluded.
If executed without parameters, default values for every parameter are used.
While Werner prefered database configurations to be dynamically created with code in test case, I prefer to offer a possibility to define them at a configuration file. My idea is to load one of the predifined configurations by name from the configuration file. Having said that I also like to offer a possibility for dynamic creation in addition to the predefined ones. You'll find a DTD and an example configuration attached for review.
Patch with new test suite configuration.