It is a typical situation when you need to update baseline data used by a checkpoint in order for the checkpoint to pass. TestComplete allows updating the baseline data of database checkpoints either at runtime or from the test log after the test run is over. This topic describes the mentioned approaches in detail.
Updating Checkpoints at Runtime
TestComplete lets you update the baseline data of your database checkpoints directly from your tests.
Database checkpoint data update can be performed using the following operations:
-
The Database Table Checkpoint keyword test operation.
-
The
DBTables.DBTableCheckpointName.Check
scripting method. -
The
DBTables.DBTableCheckpointName.Compare
scripting method.
To enable the database checkpoint data update during the test run, turn on the Update DBTable elements option:
-
Select Tools > Options from the TestComplete main menu. This will open the Options dialog.
-
Select the Engines > Stores category.
-
Select Update DBTable elements.
-
Click OK to close the dialog.
Now, when you run the test, the database checkpoint will not perform verification. Instead, TestComplete will replace the stored data with the new data retrieved from the database.
Updating Checkpoints From the Test Log
When the database checkpoint fails, you can easily update its data from the Test Log panel. For this purpose, follow the steps below:
-
Select the message informing about the checkpoint failure in the test log.
-
Switch to the Details panel.
-
Click the Update the <Checkpoint_name> checkpoint link at the top of the panel.
-
TestComplete will display a message asking whether you want to update the checkpoint. Click Yes to update the baseline data used for the failed checkpoint. TestComplete will replace the stored DBTable element with the corresponding database contents from the disk. Click No to close the message without updating the checkpoint.
See Also
Database Checkpoints
About Database Checkpoints
About DBTables Collection