home *** CD-ROM | disk | FTP | other *** search
- JDBC Test Harness Version .03 Release Notes
-
-
- What is the JDBC Test Harness?
- -----------------------------
- The JDBC Test Harness is a Java program for executing the JDBC Test
- Suite. This can be used by anyone wishing to test the functionality
- of a JDBC driver.
-
- The Harness is implemented as a console program - JDBCTestWin - which
- provides the GUI for the jdbcTest.harness Java package. Both are
- written completely in Java.
-
- The Harness was developed by JavaSoft.
-
-
- Who to contact?
- ---------------
- You can contact us at jdbc@wombat.eng.sun.com
-
-
- What version of JDBC is supported?
- ----------------------------------
- The Harness supports JDBC version 1.1.
-
-
- What operating systems are supported?
- -------------------------------------
- The Harness can be run on any system that supports Java. It was
- developed with JDK 1.0.2.
-
-
- Installation
- ------------
- You must have already installed Java, JDBC and a JDBC driver.
-
- See the Java web page for info on installing the JDK and JDBC.
-
- You must have access to a database and permission to create tables and
- database procedures.
-
- The Harness will install itself in the jdbc-harness directory; be sure to
- add the jdbc-harness/classes directory to your Java CLASSPATH environment
- variable.
-
- Both a compressed tar file for Unix and a zip file for Windows is
- provided. Be sure to use a version of unzip that preserves long file
- names.
-
- For Solaris uncompress and extract (tar xvf) the files.
-
-
- Using the Harness
- -----------------
-
- The Harness is run with the command:
-
- java JDBCTestWin
-
- It expects to find a JDBCTestWin.ini file in its current directory that
- tells it which tests to run and how to run them.
-
- Use the Connection Menu - DatabaseConnection command to define the user, password and url for a connection to test.
-
- Use the Run Menu to Start and Stop a test run.
-
- Each run rereads the JDBCTestWin.ini file so your can change the
- content of a test run without restarting the Harness.
-
- The Harness window shows a running log of the run. In addition a full
- log as well as an abbreviated pass-fail log is produced. The JDBC test suite comes with an example JDBCTestWin.ini file.
-
- The Harness must be run in the main directory of the JDBC test suite so
- that it can find it's tests.
-
-
- Specifying a JDBC Driver To Test
- --------------------------------
- The Harness loads the JDBC drivers specified in JDBCTestWin.ini.
-
- ;This sets the java.sql.Driver class to be tested
- Drivers = jdbc.odbc.JdbcOdbcDriver
-
-
- Resource ini Files
- ------------------
- Some tests theselves use ini files for customizing there operation.
- JDBCTestWin.ini specifies the directory were these ini files are to be
- found.
-
- [Resources]
- ;in this section put the path of resource files
- ; Some tests are database dependent; they use SQL which has been
- ; stored in a resource file so that it can be easily changed
- : for each DBMS
- ;
- ;Path=sqlserver-resources
- ;Path=sybase-resources
- Path=oracle-resources
-
-
-
- Debugging
- ---------
- You can enable DriverManager tracing in JDBCTestWin.ini with:
-
- [Driver Options]
- ;Set this to ON if you want full JDBC DriverManager tracing enabled.
- DriverManagerLog = ON
-
-
- Writing Your Own Tests
- ----------------------
- You can write your own JDBC tests for the Harness. See the examples
- provided with the test suite.
-
- If you have tests you would like to donate to us please send them to
- jdbc@wombat.
-
-
- Method of Operation
- -------------------
- Each JDBC driver test class extends the jdbcTest.harness.TestModule
- class. The Harness loads each class; creates an instance of it and
- executes its run method. Each test is executed in its own thread.
-
- Currently the tests are executed sequencially. Later, we will add a
- mechanism for concurrent execution.
-
- After executing each test the Harness calls java.lang.system.gc().
-
-
- Known Bugs
- ----------
- On NT/Win95 the Harness console window stops scrolling after a hundred
- or so lines. This is a cosmetic problem. All tests will still run and
- the logs will be complete.
-
-
-
- A Typical JDBCTestWin.ini File
- ------------------------------
-
- ; -- NOTE --
- ;It is expected that JDBCTestWin is executed in the top level test
- ;directory. It expects to find this file named JDBCTestWin.ini which
- ;contains the directives which control the test session.
-
-
- [Driver Options]
- ;Set this to ON if you want full JDBC DriverManager tracing enabled.
- DriverManagerLog = OFF
-
- ;This sets the java.sql.Driver class to be tested
- Drivers = jdbc.odbc.JdbcOdbcDriver
-
- [Resources]
- ;in this section put the path of resource files
- ; Some tests are database dependent; they use SQL which has been
- ; stored in a resource file so that it can be easily changed
- : for each DBMS
- ;
- ;Path=sqlserver-resources
- ;Path=sybase-resources
- Path=oracle-resources
-
- [TestModules]
- ;in this section list the test modules you want to execute
- ; moduleid = description
- connection.NativeSQL
- connection.TransactionIsolation
- connection.Catalog
- connection.DisableAutoClose
- connection.DisableAutoCommit
- connection.IsClosed
- connection.ReadOnly
- connection.Warning
-
- rsmetadata.RSMeta = Result Set Meta Data
-
- resultSet.Next
- resultSet.Close
- resultSet.GetXXX
- resultSet.GetStream
- resultSet.GetObject
- resultSet.GetXXXNamed
- resultSet.GetStreamNamed
- resultSet.GetObjectNamed
- resultSet.Null = wasNull() test
- resultSet.GetCursor
- resultSet.GetLongs = large char and large binary value test
-
-
- ;The data.Drop, data.CreateTables and data.CreateProcedures tests
- ;just run the SQL in their ini files.
- ;
- ;NOTE - you must set your Resources path above to a directory that
- ;contains the ini files for these tests in the correct syntax for
- ;your DBMS.
- ;
- ;The following tests rely on the tables and procedures created by them.
- ;They won't run correctly if these do not exist.
-
- data.Drop = Drop Test Tables and Procedures
- data.CreateTables = Create Test Tables
- data.CreateProcedures = Create Test Procedures
-
- dbmetadata.DBInfo = Functions that provide info about the DBMS
- dbmetadata.Supported = Supported Features Test
- dbmetadata.Limits = Test Various DBMS and Driver Limitations
- dbmetadata.GetSchemas = Test Schema and Catalog Metadata
- dbmetadata.GetTables = Test Table Metadata
- dbmetadata.GetColumns = Test Column Metadata
- dbmetadata.GetProcedures = Test Procedure Metadata
- dbmetadata.Conversions = Test Data Type Conversions
-
- statement.cancel
- statement.clearWarnings
- statement.executeQuery
- statement.executeUpdate
-
- ;This test uses multiple SQL statements terminated with ';' to generate
- ;multiple results. It only works on some systems.
- ;statement.getMoreResults
-
- statement.getResultSet
- statement.getUpdateCount
- statement.getWarnings
- statement.setEscapeProcessing
- statement.setMaxFieldSize
- statement.setMaxRows
- statement.setQueryTimeout
-
- preparedStatement.cancel
- preparedStatement.clearParameters
- preparedStatement.clearWarnings
- preparedStatement.executeQuery
- preparedStatement.executeUpdate
- preparedStatement.getResultSet
- preparedStatement.getUpdateCount
- preparedStatement.getWarnings
- preparedStatement.setAsciiStream
- preparedStatement.setBinaryStream
- preparedStatement.setBoolean
- preparedStatement.setByte
- preparedStatement.setBytes
- preparedStatement.setDate
- preparedStatement.setDouble
- preparedStatement.setEscapeProcessing
- preparedStatement.setFloat
- preparedStatement.setInt
- preparedStatement.setLong
- preparedStatement.setMaxFieldSize
- preparedStatement.setMaxRows
- preparedStatement.setNull
- preparedStatement.setNumeric
- preparedStatement.setObject
- preparedStatement.setQueryTimeout
- preparedStatement.setShort
- preparedStatement.setString
- preparedStatement.setTime
- preparedStatement.setTimestamp
- preparedStatement.setUnicodeStream
-
- callableStatement.getBoolean
- callableStatement.getByte
- callableStatement.getBytes
- callableStatement.getDate
- callableStatement.getDouble
- callableStatement.getFloat
- callableStatement.getInt
- callableStatement.getLong
- callableStatement.getNumeric
- callableStatement.getObject
- callableStatement.getShort
- callableStatement.getString
- callableStatement.getTime
- callableStatement.getTimestamp
- callableStatement.wasNull
- callableStatement.setBoolean
- callableStatement.setByte
- callableStatement.setBytes
- callableStatement.setDate
- callableStatement.setDouble
- callableStatement.setFloat
- callableStatement.setInt
- callableStatement.setLong
- callableStatement.setNull
- callableStatement.setNumeric
- callableStatement.setObject
- callableStatement.setShort
- callableStatement.setString
- callableStatement.setTime
- callableStatement.setTimestamp
-
- data.Drop = Drop Test Tables and Procedures
-
- [Log Files]
- ;in this section put the names of log files
-
- ;The pass-fail log is a brief log of the test session.
- passfail = passfail.log
-
- ;The output log is a more detailed log of the test session.
- output = test.log
-
-