Run Auto Tests

After you have created and installed auto tests and created test sources, you can select the test cases you want to run and the test sources you want to run them against.

To run one or more auto tests

  1. In ODBC Test, from the Tools menu, click Run Auto Tests. ODBC Test displays the Run Auto Tests dialog box.

  2. Select the test cases you want to run from the Auto Tests list.

    The Auto Tests list shows the test cases in a hierarchical structure: groups contain auto tests and auto tests contain test cases. To expand or collapse how much of the structure is shown, click the plus or minus sign beside each group or auto test name. You can select test cases in the following ways:

    • By Test Group. Choose the test group name to select all test cases in all auto tests in a group. For example, to select all test cases in all installed auto tests, choose the All group name.

    • By Auto Test. Choose the auto-test name to select all test cases in an auto test.

    • By Test Case. Choose the test case name to select an individual test case.

      To select or clear a test case or cases, click the highlighted test group name, auto test name or test case name, or press SPACEBAR.

    You can save the list of test cases, or run list, you have selected by clicking Run Lists and then clicking Save As. Later, you can select the same test cases by selecting the run list.

  3. Select the test sources from the Test Sources dialog box that you want to run the test cases against. When ODBC Test runs the auto tests, it will run each selected test case against each selected test source.

  4. Select where you want the auto tests to log output:
    • Log File. The default log file is Auto.log in the current directory. To use a different log file, click Log File. In the Log File dialog box, you can also specify whether to append to or replace the log file.

    • Screen. Log output to the Output window in ODBC Test.

      If neither Log File nor Screen is selected, the tests will not log any information. ODBC Test always displays a list in the Output window of which tests were run and how many errors occurred.

  5. Select the run-time options you want to use:
    • Debug determines whether the fDebug flag in the SERVERINFO structure is set to TRUE or FALSE. What a test does when fDebug is TRUE depends on how the test was written.

    • Isolate Tests determines whether AutoTestFunc is called once for each selected test case in an auto test (the tests are isolated) or once for the auto test. If AutoTestFunc is called once for each test case, only one bit in the rglMask bit mask in the SERVERINFO structure is set each time it is called; if it is called once for the auto test, a bit is set in rglMask for each selected test case.

    • Cursor Library determines the value of the vCursorLib variable in the SERVERINFO structure:
      Check Box vCursorLib Value
      Cleared SQL_CUR_USE_DRIVER
      Filled SQL_CUR_USE_IF_NEEDED
      Selected SQL_CUR_USE_ODBC

      How vCursorLib is used depends on how the test was written; it was intended to be used with the SQL_ATTR_ODBC_CURSORS option in SQLSetConnectAttr.

  6. Click OK. ODBC Test runs each selected test case against each selected test source.