|
Contents
Introduction
The JDBCTM API test suite contains tests useful for testing a driver based on JDBC technology ("JDBC driver") for its conformance to the requirements of the JavaTM 2 Platform Enterprise Edition (J2EETM). This test suite is intended to assist driver vendors in preparing their drivers for certification in a J2EE compatible configuration using the J2EE Compatibility Test Suite. We have attempted to make the JDBC API Test Suite comprehensive enough that it covers the JDBC requirements tested by the J2EE CTS. The tests provided in the JDBC API Test Suite are provided as is. The team at Sun working on the JDBC API does not have the resources to help with running these tests. Questions, comments and feedback regarding this test suite should be sent to the following alias: jdbc-tests@sun.comWe cannot respond to all queries but will attempt to provide an FAQ to answer the common questions. Questions regarding all other aspects of the JDBC Specification and API should continue to be sent to: jdbc@sun.comVendors wishing to buy support may do so by licensing the J2EE Platform. Please visit the following page for details: /logos/ The JDBC API test suite is provided solely for the purpose of evaluating the compatibility of JDBC drivers that are intended to run on the Java 2 Enterprise Edition Platform. Running the tests does not allow any public claims of conformance to be made. (see License) Programs are available for vendors who wish to certify a JDBC driver as compliant with the J2EE platform. Please contact Sun's Java Software Division marketing department at the following email address for further details: jdbc-certification@sun.com Steps to Install and Run the Tests The tests are run using GNU Make. GNU Make can be downloaded from the following location: ftp://ftp.gnu.org/pub/gnu/makeThe version make-3.79.1 builds on both Unix and Win32 platforms. The version of GNU Make used to test this distribution on Solaris 2.8 is shown below:
The version of GNU Make used to test this distribution on Windows NT/2000
is shown below:
For the convenience of the JDBC(TM) API Test Suite,
ensure gnumake is
available in the $PATH. Also to minimize unnecessary editing
of the Test Suite configuration files, the following should be performecd on
both Solaris/Linux and Windows platforms. OR
Additionally installations of the JavaTM 2 Standard Edition 1.3.1(J2SETM) and JavaTM 2 Enterprise Edition 1.3.1 (J2EETM) are required.
http://java.sun.com/products/
Download the ' Unzip the 'jdbccts-1_3_1.zip' file:
Set the CTS_HOME
environment variable to the directory where you have unzipped the 'jdbccts-1_3_1.zip'
file:
Change the current directory to the install directory:
Run the setup scripts, which generates the '$CTS_HOME/bin'
directory containing scripts and configuration files used for the JDBC
Test Suite.
Set the following environment variable to the appropriate values for your
system:
Set the following environment variable:
Next, the following configuration files require some modifications:
Edit the file '
Edit the file ' Additionally, provide the values for the following properties:
Note: The ' LOCAL_CLASSES'
property should include details of the JDBC driver under test with the
JDBCTM 1.3.1 API Test Suite.
Edit the file '
First add the JDBC Driver name
Add the data source 'jdbc/DB1'
Additionally, ensure the JDBC drivers that are being tested should be
located in the following directory to ensure the J2EE Reference Implementation
can locate the drivers. A copy of JDBC driver jars should be added
to the '$J2EE_HOME/lib/system'
directory.
Detailed instructions on adding additional JDBC drivers and data sources to the J2EE Reference Implementation are available at: http://java.sun.com/j2ee/sdk_1.3/techdocs/release/ConfigGuide.html#12442Add the ' $CTS_HOME/bin'
directory to the PATH environment variable.
Next populate the database with the required tables, entries and stored
procedures:
Note: For databases and JDBC drivers other than those provided by the J2EE
Reference Implementation, options can be set using the following parameters:
Now start the J2EE application server and the database and start the tests:
Note: If errors occur in deployment of all tests to the J2EE
application server, ensure the
Running the tests on the Windows platform requires that you use the MKS Unix Toolkit. The test suite has been successfully run using the MKS Unix Toolkit 6.1a and MKS Unix Toolkit 6.2. Note the following instructions that the slashes '/' are forward slashes even though they allow for a DOS style driver letter specification 'C:' Download the ' Unzip the 'jdbccts-1_3_1.zip' file:
Open a MKS shell and perform the following environment configuration.
Set the CTS_HOME environment variable to the directory where you have
unzipped the '
Change the current directory to the install directory:
Run the setup scripts, which generates the '$CTS_HOME/bin' directory
containing scripts and configuration files used for the JDBC Test Suite.
The 'setup.bat' must be renamed as 'setup.win32.bat' so as not to confuse
it with the 'setup.sh' script as both are present.
Set the following environment variables to the appropriate values for your system and reset the value of CTS_HOME Set the following environment variable:
Next, the following configuration files require some modifications:
Edit the file '
Edit the file ' Additionally, provide the values for the following properties:
Note: The ' LOCAL_CLASSES'
property should include details of the JDBC driver under test with the
JDBCTM 1.3.1 API Test Suite.
Edit the file '
Edit the file 'Next ensure the JDBC driver under test is accessible to the J2EE Reference Implementation. The following example shows how the data source names are defined for the Cloudscape database that is included in the J2EE Reference Implementation. First, add the JDBC Driver name:
Then add the data source 'jdbc/DB1':
Additionally, ensure the JDBC drivers that are being tested should be
located in the following directory to ensure the J2EE Reference Implementation
can locate the drivers. A copy of JDBC driver jars should be added
to the '$J2EE_HOME/lib/system'
directory.
Detailed instructions on adding additional JDBC drivers and data sources to the J2EE Reference Implementation are available at: http://java.sun.com/j2ee/sdk_1.3/techdocs/release/ConfigGuide.html#12442Add the ' $CTS_HOME/bin'
directory to the PATH environment variable:
Next populate the database with the required tables, entries and stored
procedures:
Note: For databases and JDBC drivers other than those provided by the J2EE
Reference Implementation options can be set using the following parameters:
Now start the J2EE application server and the database and start the tests:
While the tests are being run, log files are produced in each test sub-directory: build.out - output from the makefile target 'build'As each set of tests is run, the output is appended to:
When the all of the tests have been run, this file contains a complete
log of the test run.
The JDBC API test suite contains a list of excluded tests ("the exclude
list"). Tests on the exclude list are not run by the test harness. Tests
on the exclude list may become required in future versions of the test
suite.
Customization of SQL Statements The SQL statements that are executed by the tests may need to be customized
for certain DBMSs. Two customized DDL files ('
| |||
|
| ||||||||||||