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 data of XML checkpoints either at runtime or from the test log after the test run is over. This topic describes the mentioned approaches in detail.
The XMLCheckpoint element data update is supported by the following test operations:
The XML Checkpoint keyword test operation.
XML.XMLCheckpointName.Check scripting method.
XML.XMLCheckpointName.Compare scripting method.
As a rule, these test operations are used to check XML document contents against data stored by the XMLCheckpoint element, but they can also replace the stored contents with the contents of the specified XML document instead of checking them.
To enable the XML checkpoint data update, turn on the Update XML data option:
Select Tools > Options from the TestComplete main menu. This will open the Options dialog.
Select the Engines > Stores category.
Select Update XML data.
Click OK to close the dialog.
Now, when you run a test containing any of the mentioned test operations, TestComplete will automatically replace data stored in the XMLCheckpoint element with data obtained from the specified XML document.
When an XML 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 bottom 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. After that, TestComplete will replace the stored XML file with the corresponding file on the disk. Click No to close the message without updating the checkpoint.