EnableStackOnCheckpoint Property

Applies to TestComplete 15.62, last modified on March 19, 2024

Description

The EnableStackOnCheckpoint property specifies whether TestComplete will track and save the call stack information for each checkpoint message posted to the test log from a keyword test or script routine. The collected data is shown in the Call Stack panel of the test log. Using this information, you can determine the sequence of tests and script routines that led to the execution of the test (or routine) in which the checkpoint message was posted.

Declaration

CallStackSettingsObjObj.EnableStackOnCheckpoint

Read-Write Property Boolean
CallStackSettingsObjObj An expression, variable or parameter that specifies a reference to a CallStackSettingsObj object

Applies To

The property is applied to the following object:

Property Value

True, if TestComplete should collect the call stack information for each checkpoint message posted to the log, or false otherwise.

Remarks

By default, the property’s value is true. You may want to set it to false to decrease the overall size of the log files.

The changes that you make to the call stack settings have effect only during the execution of one test item or one test (if you run the test from the test editor or the Project Explorer panel). When the next test item starts or when you run the test for the next time, the default settings will be used.

Example

The code below obtains information about the call stack settings, disables collecting the call stack information for the period when a checkpoint message is being posted to the test log, posts the checkpoint message to the test log and then enables collecting the call stack information.

JavaScript, JScript

function CallStackSet()
{
  // Obtains the call stack settings
  var StackSet = Log.CallStackSettings;
  // Disables collecting the call stack information for the period
  // when a checkpoint message is being posted to the test log
  StackSet.EnableStackOnCheckpoint = false;
  // ...
    Log.Checkpoint("A sample checkpoint message.");
  // ...
  // Enables collecting the call stack information
  StackSet.EnableStackOnCheckpoint = true;
}

Python

def CallStackSet():
  # Obtains the call stack settings
  StackSet = Log.CallStackSettings
  # Disables collecting the call stack information for the period
  # when a checkpoint message is being posted to the test log
  StackSet.EnableStackOnCheckpoint = False
  # ...
  Log.Checkpoint("A sample checkpoint message.")
  # ...
  # Enables collecting the call stack information
  StackSet.EnableStackOnCheckpoint = True

VBScript

Sub CallStackSet
  ' Obtains the call stack settings
  Set StackSet = Log.CallStackSettings
  ' Disables collecting the call stack information for the period
  ' when a checkpoint message is being posted to the test log
  StackSet.EnableStackOnCheckpoint = false
  ' ...
    Log.Checkpoint("A sample checkpoint message.")
  ' ...
  ' Enables collecting the call stack information
  StackSet.EnableStackOnCheckpoint = true
End Sub

DelphiScript

function CallStackSet;
var StackSet;
begin
  // Obtains the call stack settings
  StackSet := Log.CallStackSettings;
  // Disables collecting the call stack information for the period
  // when a checkpoint message is being posted to the test log
  StackSet.EnableStackOnCheckpoint := false;
  // ...
    Log.Checkpoint('A sample checkpoint message.');
  // ...
  // Enables collecting the call stack information
  StackSet.EnableStackOnCheckpoint := true;
end;

C++Script, C#Script

function CallStackSet()
{
  // Obtains the call stack settings
  var StackSet = Log["CallStackSettings"];
  // Disables collecting the call stack information for the period
  // when a checkpoint message is being posted to the test log
  StackSet["EnableStackOnCheckpoint"] = false;
  // ...
    Log["Checkpoint"]("A sample checkpoint message.");
  // ...
  // Enables collecting the call stack information
  StackSet["EnableStackOnCheckpoint"] = true;
}

See Also

Checkpoint Method
Test Results
Generic Test Log - Call Stack Panel

Highlight search results