Table of Contents |
---|
Introduction
This page lists the various top-level tests that can be run against Derby, it applies to the trunk only. In most cases a test class can be run directly by any JUnit test runner without setting system properties.
Ant Targets
ant target | Comments |
| Remove any folders from previous junit runs through ant targets. |
| Run all the functional tests. Intended to match |
| Run |
| Run a short version of any system tests that run under junit. Intended to be a quick check of Derby and the system test. (requires explicit setting of the classpath) |
| Run |
| Run a single test or suite that runs under junit. Set the system property derby.junit.testclass to the full classname of the test or suite you want to run. (requires explicit setting of the classpath) |
| Converts the set of XML junit files in the current run into an HTML report. Used along with other junit-* targets. The |
junitreport | Combination of junit-all and junit-html |
Examples
No Format |
---|
# Run junit-all generating XML files after cleaning any old junit test runs ant junit-clean junit-all # Run the mini system tests from a set of codeline jar files and then produce an HTML report in addition to the XML files. ant junit-clean junit-system-mini-codeline-jars junit-html # Multiple test targets can be combined into a single run and HTML report ant junit-clean junit-all-codeline-jars junit-system-mini-codeline-jars junit-html # Single test class run with HTML report ant -Dderby.junit.testclass=org.apache.derbyTesting.functionTests.tests.management._Suite junit-clean junit-single junit-html |
Functional and Unit Tests
The test classes that need to be run to cover all functional and unit tests for Derby.
Test Class | Run by junit-all | Comments |
| Yes, though the ant targets contain logic that matches the contents of suites.All rather than running suites.All directly. | Majority of the functional & unit tests, all intended to be run as a single Junit test run invocation. If details are needed on the tests included then look at the source and see what tests are included. Any test class run directly or indirectly by suites.All can be run as a standalone JUnit test, e.g. |
| Yes, via target | Each test class needs to be in a separate JUnit run in its own JVM as these are testing the auto-loading of JDBC drivers at JVM startup. |
| ||
| ||
| ||
| Yes | Upgrade tests, included in |
| No, run target 'pptesting' manually. | These tests run against package private classes and/or methods. Therefore, they have to be in the same package as the class they are testing. Because we do not want to distribute test code in the production code jars, these tests are currently only intended to be run against the classes-directory. Most of these tests are rather low-level. |
System Tests
Performance Tests
Test Class | Run by junit-all | Comments |
| No | All the basic performance tests will get run |
| No | Run the load phase including schema creation for the Order Entry benchmark |