Checkpoint method posts a new message of the checkpoint type to the test log. A checkpoint message is a message next to which TestComplete displays the Checkpoint glyph.
Log.Checkpoint(MessageText, AdditionalInformation, Priority, Attr, Picture, FolderID)
|AdditionalInformation||[in]||Optional||Variant||Default value: Empty string|
|Priority||[in]||Optional||Integer||Default value: pmNormal|
||Default value: Default attributes|
|Picture||[in]||Optional||A string, a
|FolderID||[in]||Optional||Integer||Default value: -1|
The method is applied to the following object:
The method has the following parameters:
The message text. This text will be added to the Message column of the Test Log. MessageText can hold data of any OLE-compatible type. If it cannot be converted to text, its value is ignored.The parameter does not support multiline text, that is, you cannot post multiline messages to the Message column. To post multiline text to your test log, use the AdditionalInformation parameter.
Additional text to be displayed in the Details pane of the Test Log. AdditionalInformation can hold data of any type compatible with OLE. If it cannot be converted to text, its value is ignored.
The AdditionalInformation parameter can also hold HTML code. The test engine will compile the HTML page and display it in the Details pane. For more information, see Posting Messages to the Log.
The message priority. You can use any integer number or any of the following constants:
||100||The lowest priority of the message.|
||200||The message priority which is lower than normal.|
||300||The normal (default) priority of the message.|
||400||The message priority which is higher than normal.|
||500||The highest priority of the message.|
The font and color settings that will be applied to the newly created informative message in the log. They are represented by a
LogAttributes object. If this parameter is omitted, default attributes will be applied.
Specifies the image to be posted to the test log along with the message. This image will be displayed in the Picture pane of the Test Log when that message is selected. You can use one of the following values in this parameter:
onscreenobject or the
The format of the posted images specified by the mentioned scripting objects is controlled by the image settings of your test project. The format of images taken from existing files is not changed.
Identifier of the test log’s folder to which the message will be posted. To get this identifier, use the
AppendFolder method. If this parameter refers to a non-existent folder, is omitted or is set to -1 (the default value), the
Message method will either post the message to the default folder of the test log or append it to the test log outside of any folder (if the default folder is not set). The default folder is the folder that is currently at the top of the folder stack, which is populated during the script run. To push a folder to or pop it out of this stack, use the
PopLogFolder method correspondingly.
Log.CallStackSettings.EnableStackOnMessage property is True, then the test engine collects information about the execution sequence of tests that led to the call of the
Log.Checkpoint method and displays this information in the Call Stack page of the test log. See Collecting Call Stack Information for Log Messages.
When you call the
Log.Checkpoint method, the test engine generates the
The following code illustrates the use of the
if (Regions.Compare("Image1Name", "Image2Name"))
Log.Checkpoint("The verification passed.");
def Test(): if Regions.Compare("Image1Name", "Image2Name"): Log.Checkpoint("The verification passed.")
If Regions.Compare("Image1Name", "Image2Name") Then
Log.Checkpoint "The verification passed."
if Regions.Compare('Image1Name', 'Image2Name') then
Log.Checkpoint('The verification passed.');
if (Regions["Compare"]("Image1Name", "Image2Name"))
Log["Checkpoint"]("The verification passed.");
After these tests have been run, the log will contain the The verification passed string with the icon in the Type column.