Applies to TestComplete 14.10, last modified on June 5, 2019

In TestComplete, you can use database checkpoints to verify data stored in a database by comparing it with baseline data stored in your project.

The verification procedure works in the following way:

  • When you create a database checkpoint, you specify connection settings for the database and the records you want to verify. TestComplete stores the connection information and the baseline recordset retrieved from the database in the DBTable element of the project’s Stores | DBTables collection.

  • When you run the test, the database checkpoint uses the connection information stored in the DBTable element to connect to the database. If the checkpoint cannot find the needed database, it waits for it for the period of time specified by the Auto-wait timeout setting. If the database has not been found by the end of the specified time period, the verification fails.

  • The database checkpoint retrieves the actual data from the database for verification.

  • If you specified the exact number of records for verification, then the checkpoint checks whether the number of records in the actual recordset differs from the number of records stored in the baseline recordset. If the numbers differ, the checkpoint fails.

  • The checkpoint checks whether the actual recordset contains all fields stored in the DBTable element.

  • The further operations depend on whether the baseline recordset contains columns marked as key columns or not.

    • If you defined key columns, then the checkpoint --

      • Iterates through stored records.

      • Uses the key columns to locate the appropriate record in the retrieved recordset.

      • Checks the fields of the actual records against the stored records.

    • If you did not define key columns, then the checkpoint --

      • Checks the actual records against the stored records comparing them one by one. In other words, compares the first stored record with the first record retrieved from the database, then compares the second stored record with the second retrieved record and so on.

      • If an actual field value differs from the relevant stored field value, the verification fails. The verification also fails if the stored and the actual recordsets contain a different number of records.

    Note: When verifying records, TestComplete checks only those fields that are checked in the DBTable Element editor. Unchecked fields are ignored.

See Also

Database Checkpoints
About Database Checkpoints
Using Key Columns
Database Checkpoints - Specifics

Highlight search results