Log.CheckpointCount Property

Applies to TestComplete 14.10, last modified on June 5, 2019

Description

Returns the number of checkpoint messages (that is, messages added via the Log.Checkpoint method or returned by any checkpoint operation) posted to the test log during the current run of the current test item.

Declaration

Log.CheckpointCount

Read-Only Property Integer

Applies To

The property is applied to the following object:

Property Value

An integer value that indicates the number of checkpoint messages in the test log.

Example

The code below obtains the total number of checkpoint messages posted to the test log and then checks whether this number is not null.

JavaScript, JScript

function CheckpointCount()
{
  // ...
  
  // Obtains the total number of checkpoint messages
  // posted to the current test log
  var CheckCount = Log.CheckpointCount;
  
  // Checks whether there are some checkpoint messages
  if ( CheckCount > 0 )
    Log.Message("There is(are) " + CheckCount + " checkpoint message(s) in the test log.")
  else
    Log.Message("There are no checkpoint messages in the test log.");
}

Python

def CheckpointCount():
  # ...
  # Obtains the total number of checkpoint messages 
  # posted to the current test log
  CheckCount = Log.CheckpointCount
  # Checks whether there are some checkpoint messages
  if CheckCount > 0:
    Log.Message("There is(are) " + str(CheckCount) + " checkpoint message(s) in the test log.")
  else:
    Log.Message("There are no checkpoint messages in the test log.")

VBScript

Sub CheckpointCount()

  ' ...
  
  ' Obtains the total number of checkpoint messages
  ' posted to the current test log
  CheckCount = Log.CheckpointCount
  
  ' Checks whether there are some checkpoint messages
  If CheckCount > 0 Then
    Log.Message("There is(are) " & CheckCount & " checkpoint message(s) in the test log.")
  Else
    Log.Message("There are no checkpoint messages in the test log.")
  End If
  
End Sub

DelphiScript

function CheckpointCount;
var CheckCount;
begin

  // ...
  
  // Obtains the total number of checkpoint messages
  // posted to the current test log
  CheckCount := Log.CheckpointCount;
  
  // Checks whether there are some checkpoint messages
  if ( CheckCount > 0 ) then
    Log.Message('There is(are) ' + CheckCount + ' checkpoint message(s) in the test log.')
  else
    Log.Message('There are no checkpoint messages in the test log.');

end;

C++Script, C#Script

function CheckpointCount()
{
  // ...
  
  // Obtains the total number of checkpoint messages
  // posted to the current test log
  var CheckCount = Log["CheckpointCount"];
  
  // Checks whether there are some checkpoint messages
  if ( CheckCount > 0 )
    Log["Message"]("There is(are) " + CheckCount + " checkpoint message(s) in the test log.")
  else
    Log["Message"]("There are no checkpoint messages in the test log.");
}

See Also

Test Results
Log.Checkpoint Method
Log.ErrCount Property
Log.WrnCount Property
Log.MsgCount Property
Log.EvnCount Property
Log.ImgCount Property
Log.FileCount Property
Log.LinkCount Property
Log.FolderCount Method

Highlight search results