Database Table Checkpoint Operation

Applies to TestComplete 15.63, last modified on April 10, 2024

Description

Use the Database Table Checkpoint operation to compare the contents of a database table, view or query against a baseline copy of data stored in your project, or to update the baseline copy with the data retrieved from a database. The functioning mode of the operation is specified by the Update DBTable elements setting (you can modify it in the Stores Options dialog). By default the setting is disabled, and the operation performs the comparison. If the setting is enabled, the operation updates the stored baseline copy.

When you add the operation to your test, TestComplete displays the Checkpoint wizard, where you specify the connection settings to the database and the table, view or query whose data will be verified. After you close the wizard, TestComplete retrieves data from the database and saves this data as a new DBTable element to the Stores | DBTables collection. This data will be used as a baseline copy. If the operation works in comparison mode, TestComplete will compare the actual database contents with this saved copy during the test execution. If the operation works in update mode, TestComplete will update the baseline copy with the information that is stored in the database. To modify checkpoint parameters, double-click the operation in the Keyword Test editor. This will invoke the Checkpoint wizard in which you can specify a new value for the desired parameter.

Operation Result

In comparison mode, if the database data coincides with the saved baseline copy, the operation returns True and posts a checkpoint message () to the test log. Otherwise, the operation returns False and posts an error message () to the log.

In update mode the operation always returns True.

Scripting Analogue

The operation is analogue to the DBTable.Check scripting method.

Child Operations

The operation cannot have child operations.

Operation Parameters

The operation has one parameter:

DBTable Element

Specifies the name of the DBTable element that contains the baseline data. This name is displayed in the Operation column of the Keyword Test editor.

To specify another DBTable element that will be used by the comparison procedure:

  • Select the operation’s row in the test.

  • Select the Operation cell and then click within it or press F2. This will activate the in-place editor.

  • Choose the desired DBTable element from the drop-down list.

  • Press Enter to confirm the change and close the in-place editor, or press Esc to close the editor discarding any changes.

To modify the connection settings and data of the stored baseline copy, use the DBTable Element editor. The stored data can also be changed from scripts. For information, see Modifying DBTable Elements.

An alternative approach to modifying the connection settings and data is to repeat the operation setup steps in the Checkpoint wizard. To invoke this wizard, double-click the operation in the Keyword Test editor.

Remarks

By default, if the Database Table Checkpoint operation cannot find or access the object the contents of which it verifies, it waits for the object for a period that the Playback > Auto-wait timeout property of your project specifies. If the object has not been found by the end of the period, the operation fails.

For information on database checkpoints, on creating and modifying them and on how the comparison procedure works, see the Database Checkpoint section.

See Also

Checkpoints Category
About Database Checkpoints
About DBTable Element Editor
Modifying DBTable Elements
Specifying Operation Parameters
Checking Operation Result

Highlight search results