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.
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.
DBTables.DBTableCheckpointName.Check scripting method.
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.
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.