Writing an Auto Test

Writing an auto test is like writing any other ODBC application. You must write code to allocate and free handles, connect to and disconnect from data sources, and access data. As a starting point, you can use custom.c or quiktest.c in the \Samples\Odbc\Quiktest directory.

Note   An auto test does not have to manage handles or connections if it uses the ODBC Test Handles test source.

An auto test contains one or more test cases, each of which tests some specific functionality. For example, an auto test for SQLAllocStmt might contain two test cases, one to call SQLAllocStmt with all combinations of valid and invalid arguments and one to call SQLAllocStmt repeatedly until the driver runs out of statement handles.

The QTBUILD program shipped with the SDK requires specified names for the source files for an auto-test DLL.

The auto test must export the following functions, which are called by ODBC Test:

An auto test can call the following two functions in gtrtst32.dll: