OLE DB SDK Test Tools Overview

Testing components are provided to help you develop OLE DB consumers and providers. These components are not redistributable and must be used solely for developing OLE DB consumers and providers.

Interface Test Tool (ITest)

The Interface Test Tool is a COM interface testing environment that enables you to exercise and explore OLE DB providers through an ad hoc mechanism and to record the results of these actions. ITest works with any OLE DB provider that is registered on your system and can create and manage OLE DB data source objects, sessions, commands, and rowsets.

ITest Spy Tool

The ITest Spy tool enables you to record calls executed by an OLE DB consumer. Spy records all information about each OLE DB call, including the input parameters supplied, the output parameters returned, and any return codes or messages.

To use the OLE DB Spy facility, HookOle must be installed. The HookOle files are in the hookole subdirectory of the MSDA SDK.

Important   If HookOle is already installed on your computer you must remove it before installing the version contained in the DA SDK.I If you do not have a previous version of HookOle on your computer, skip these steps and begin the installation process with the section "To install HookOle:" later in this topic.

To remove/unregister a previous version of HookOle

  1. Click Start, point to Settings, and click Control Panel. Double-click the Add/Remove Programs icon.

  2. Click the Install/Uninstall tab. Find HookOle in the list of programs and select it.

  3. Click the Add/Remove button. Follow the instructions to remove HookOle.

If for any reason this fails, manually rename the ole32.dll file to some other name and then rename the ole32r.dll to ole32.dll. This removes HookOle from the operating system.

To install HookOle

  1. Run HookOle setup from the \hookole directory within the DA SDK directory.

  2. Restart your computer. HookOle registration is not complete until your computer is restarted.

Important   If you reinstall Windows 95 or Windows NT on your computer, you will have to reinstall HookOle.

The ITest executable files are found in the BIN/OLEDB subdirectory. The following files are components of ITest.

File name Description
ITNode.dll Object node support
ITEST.EXE Interface test application (Interface Test Tool environment shell)
ITESTSPY.EXE ITest Spy application
ITCallWindow.DLL Interface test call window
oledbADL.DLL OLE DB operations library
ITADL.DLL Base class for API definitions
oledbRowsetWindow.DLL Interface Test rowset window shell
ITAIS.dll General execution services

Local Test Manager (LTM)

The Local Test Manager (LTM) is an easy-to-use tool that provides a single point of control for automated testing of OLE DB providers. Once you have created your test modules byusing the OLE DB Test Editor to help generate a .cpp file, you can use LTM to select and run a test module and its cases, variations, and providers on a single local computer. For more information on using LTM for conformance testing see "Conformance Testing in OLE DB 2.0" technical article.

OLE DB Test Editor

The Microsoft OLE DB Test Editor enters the automated test framework code in a .cpp file for use with Local Test Manager. The framework code represents a module with tests and variations that will be run.

File name Description
TestWizard.EXE A wizard that assists test designers in creating and modifying tests.
LTM.EXE The main Local Test Module component. This component runs automated tests.

QuikTest Test Module

The QuikTest module provides a broad range of test coverage. This coverage produces a useful overview of provider functionality but does not test OLE DB providers thoroughly. For information about how to build and run the QuikTest module, see "Unsupported Sample Test Modules" in this topic.

To run the QuikTest, you must specify initialization information for the provider you select. To specify this information, click in the Init String in the Tools/Options dialog box under the Providers tab in LTM.

For data sources that do not require a password, the Init String should have the following format:

NAME=Value;USERID=Value; 

For example, to run against the ODBC Provider using the Microsoft Jet OLE_DB_NWind_Jet ODBC data source installed with this SDK, specify the following Init String for a provider:

NAME=OLE_DB_NWind_Jet;USERID=admin; 

For data sources that require a password, the Init String should have the following format:

NAME=Value;USERID= Value;PASSWORD=Value;

For example, to run against the ODBC Provider using a SQL Server data source that requires a password, specify an Init String similar to the following:

NAME=MySQLServerDSN;USERID=SSUser;PASSWORD=SSPwd;
File name Description
QUIKTEST.DLL QuikTest module

Unsupported Sample Test Modules

The MSDA SDK includes some sample test modules in the \conformance\tests directory. Each test module is named with an abbreviated form of the interface it tests. These tests, provided in source code form, can be compiled and run through the Local Test Manager. These test modules are offered only as examples of test code and are not supported in any way. You may not make any claims of conformance based on these tests, nor may you redistribute them in whole or in part.

Before you can build any of the OLE DB tests except for QuikTest, you must first build the Private Library (privlib.dll), which is used by these tests.

To build the Private Library in Microsoft Developer Studio

  1. Open the workspace of the Private Library makefile. This is in \msdasdk\conformance\tools\PrivLib.

  2. From the Tools menu, choose Options, then click the Directories tab. Add the following directories for include files:

    \msdasdk\conformance\include
    \msdasdk\conformance\tests\proposed\OLEDBTests\include

    and the following directories for library files:

    \msdasdk\conformance\lib
    \msdasdk\lib

  3. Build the Private Library (PrivLib.dll) using the default target.

  4. Copy privlib.dll from \msdasdk\conformance\tools\PrivLib\x86_debug to \msdasdk\bin.

To build the OLE DB tests, including QuikTest, in Microsoft Developer Studio

  1. Open the workspace of the makefile for the test you want to build. The makefiles are found in \msdasdk\conformance\tests\unsupported\tests and in \msdasdk\conformance\tests\proposed\OLEDBTests.

  2. From the Tools menu, choose Options, then click the Directories tab. Add the following directory for include files:

    \msdasdk\conformance\include

    Note that you still need the include and library directories you added when you built the Private Library.

  3. Build the test module using the default target.

To run the OLE DB tests, including QuikTest

  1. Update your environment path. In the Control Panel, double-click the System icon. Click the Environment tab. In the System Variables list, select the Path variable. In the Value box, type <install directory>\bin at the end of the value, separating it from the previous directory by a semicolon.

  2. Following the instructions in the Local Test Module Help file, register, install, and run the test. The initialization information to be used is explained in the "QuikTest Test Module" section, earlier in this topic.