Debugging Tests

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

Debugging lets you fix logical errors and check whether your tests run correctly. TestComplete includes two types of debuggers: script debugger and debugger of keyword tests (or keyword test debugger). These debuggers include all modern debugging features: breakpoints, tracing into routines or tests and stepping over them, the call stack, watch list, expression evaluation, and so forth. Though the functionality of these debuggers differs a little (for instance, the way you set breakpoints in script code differs from the way you do this in keyword tests), the debuggers are very similar. They have the same methodology of use and share the same panels, dialogs and menu items. Moreover, the script and keyword test debuggers are tightly integrated. For example, if you debug a keyword test, and it executes an operation that runs script code, the keyword test debugger will automatically activate the script debugger, so you will continue with debugging of script code. Similarly, if you trace the execution of a script routine, and it performs a method call that runs a keyword test, the script debugger will automatically launch the keyword test debugger, so you will continue with debugging the keyword test.

The following topics provide more information on debugging in TestComplete:

General

Debugging Tests - Overview

Provides information on how to use the script and keyword test debuggers and about the software required for debugging.

Debugging Tests - Specifics

Describes specifics of debugging script code and keyword tests with TestComplete and describes problems that may occur during the debugging.

Activating Debugger From Tests

Explains how to activate the step-by-step execution mode from the script or keyword test.

Evaluating Expressions

Describes how to evaluate expressions during debugging.

Format Specifiers

Describes how to format expressions in the Evaluate dialog that is used to evaluate code expressions and variable values during debugging.

Changing Variables During Debugging

Explains how to change the values of script and keyword test variables during debugging.
Running Tests

Running to the Cursor

Describes how to stop the script or keyword test execution on the current script line or keyword test operation.

Stepping Through Test

Describes how to step over or trace into a script routine or keyword test during the debugging process.

Setting Next Execution Point

Describes how you can change the current line or keyword test operation and specify the next line or operation for execution.
Breakpoints

Using Breakpoints

Explains how you can create and use breakpoints and how to modify their properties.

Conditional Breakpoints

Describes conditional breakpoints and how you can use them.

Breakpoints - Creating Conditional Expressions

Describes how to specify conditional expressions for breakpoints.

Breakpoints - Using Pass Count

Describes how to specify the Pass Count attribute of breakpoints and how this attribute is used.

Breakpoints Panel

Describes the Breakpoints panel that is used to view and manage breakpoints that are set in script units and keyword tests.
Debugger Panels

Call Stack Panel

Provides information on viewing the stack of function calls (or the sequence of keyword tests) during the test execution.

Locals Panel

Describes the Locals panel that displays values of available script variables.

Watch List Panel

Provides information on the Watch List panel and describes how you can use it to watch values of variables and expressions.
Related Topics of Interest

Engines - General Options

Provides information on TestComplete options that are used when debugging.

Handling Exceptions in Scripts

Describes how to handle exceptions that occur in scripts and in the application under test.

Collecting Call Stack Information for Log Messages

Describes how to collect call stack data for messages posted to the test log. The call stack information may help you better understand what happened in your test during the run.

See Also

Script Tests
Keyword Tests

Highlight search results