28. RegressionTests28.1. The built-in db4o regression testsDb4o includes a fairly comprehensive suite of regression tests to help prevent errors from creeping into the code over time. Since no regression test suite is perfect, we are documenting how to work with our tests in the hope that customers will benefit from seeing the test suite improve. 28.2. Running the regression testsDb4o includes its complete source code and test suite packaged in zip files in the src folder of the distribution. The first step in running the test suite is to unpack these zip files in the src folder so that they can be compiled an run. From the command line on Linux, this would look like: - cd /path/to/db4o- - unzip *src* - unzip *test* Users of other platforms can easily substitute their favoriate tools in this procedure. Next, create an Eclipse project, pointing to the folder where you unpacked db4o. For Eclipse 3.1M7, the procedure is: - Make sure the Console view is open so you can see the output - File | New | Project... - Pick "Java Project" and click "Next" - Type a project name - Pick the "Create Project from existing source" radio button - Enter "/path/to/db4o- - Click "Finish" - Expand the "src" folder, then the com.db4o.test package - Right-click "AllTests.java" - Choose "Run As | Java Application" 28.3. Switching individual tests on or offIndividual tests may be turned on or off by commenting or uncommenting lines corresponding to each individual test in the suite. The test suite is defined by classes beginning with com.db4o.test.AllTestsConf*. Each test class is listed in an array returned by the tests() method in the *Conf* class. -- generated by Doctor courtesy of db4objects Inc. |