Derby Compatibility Tests

Revision Author Date Comment
1.0 Rick Hillegas 06 September 2005 First cut.

Overview

This web page describes how to setup and run the Derby Compatibility Tests. These tests stress the compatibility of Derby clients and servers running at different rev levels and on different VMs. We currently test the following combinations:

Clients

Derby 10.1
Derby 10.2
DB2JCC 2.4

Servers

Derby 10.1
Derby 10.2

VMs

jdk1.3
jdk1.4
jdk1.5

Test Setup

To run these tests, you will need to download various VMs and Derby releases. You will also need to edit ant.properties in your home directory, adding variables which point at these VMs and releases. For a complete description of this setup, run the following command, invoking testScript.xml (which lives in the same directory as this web page):

ant -buildfile testScript.xml -projecthelp

Running the Tests

To run the tests, you will need to do the following:

Something like the following should work:

#! /usr/bin/bash
#
# Run the compatibility tests.
#
# $1    directory to hold output, e.g., c:/cygwin/home/aliceBToklas/derby/mainline/testRun
# $2    location of derby trunk, e.g., c:/cygwin/home/aliceBToklas/derby/mainline/testRun/trunk

outDir=$1
trunkDir=$2
COMPAT_DIR=$trunkDir/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility

rm -rf $outDir
mkdir $outDir

ant -buildfile $COMPAT_DIR/testScript.xml -DoutDir=$outDir

When the tests startup, they defensively bring down the Derby network server in case it was running. Generally, it won't be, and you can expect to see a couple vacuous diagnostics, which you may ignore:

_stopServer:
     [exec] Could not connect to Derby Network Server on host localhost, port 1527.
     [exec] Result: 1

Analyzing Failures

If the tests succeed, ant will happily report:

BUILD SUCCESSFUL

Otherwise, ant will report a failure. In this case, the output directory will hold a file called SUMMARY_COMPAT.txt. This file will identify which test run failed. More specifically, SUMMARY_COMPAT.txt will hold the name of an output file which describes the specific test failures.