Description
You use the CallStackSettings
object to specify whether the test engine will collect information about the test execution sequence for messages posted to the test log. After the test run is over, you can view the collected call sequence in the Call Stack panel of the test log and learn the sequence of script routines and keyword tests that led to the execution of the test (or routine) that posted the message to the log. See Collecting Call Stack Information for Log Messages.
By default, the test engine collects the call stack sequence only for error messages and the Call Stack panel is available only for them. You can use properties of the CallStackSettings
object to enable the call stack tracing for messages of other types.
To obtain the object in your tests, use the Log.CallStackSettings
property.
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. |
Members
Example
The following example demonstrates how you can enable and disable the call stack tracing for warning messages:
JavaScript, JScript
// Enable call stack tracing
Log.CallStackSettings.EnableStackOnWarning = true;
// Disable call stack tracing
Log.CallStackSettings.EnableStackOnWarning = false;
Python
# Enable call stack tracing
Log.CallStackSettings.EnableStackOnWarning = True
# Disable call stack tracing
Log.CallStackSettings.EnableStackOnWarning = False
VBScript
' Enable call stack tracing
Log.CallStackSettings.EnableStackOnWarning = True
' Disable call stack tracing
Log.CallStackSettings.EnableStackOnWarning = False
DelphiScript
// Enable call stack tracing
Log.CallStackSettings.EnableStackOnWarning := true;
// Disable call stack tracing
Log.CallStackSettings.EnableStackOnWarning := false;
C++Script, C#Script
// Enable call stack tracing
Log["CallStackSettings"]["EnableStackOnWarning"] = true;
// Disable call stack tracing
Log["CallStackSettings"]["EnableStackOnWarning"] = false;
See Also
CallStackSettings Property
Collecting Call Stack Information for Log Messages
Generic Test Log - Call Stack Panel