Project Properties - Playback Options

Applies to TestComplete 14.30, last modified on November 21, 2019

The Playback options specify how TestComplete processes events that occur during the test run.

To view or modify playback options:

  1. Select Tools > Current Project Properties from the TestComplete main menu.

  2. On the Properties page of the project editor, click Playback in the list in the left part of the page.

TestComplete Project Properties - Object Mapping

Click the image to enlarge it.

You can change the following options:

  • Error handling - These options specify the TestComplete behavior when one of the following events occurs during the test run. To learn about values you can assign to these options, see below.

    For each of the events described above, you can configure TestComplete to do one of the following:

    • Continue running the test.

    • Stop the current test. If TestComplete is running a project, it will proceed with the next sibling test item. If TestComplete is running tests matching a tag or a tag expression, it will stop running the current test and proceed with the next matching test.

    • Stop the current project. If TestComplete is running a single test, it will stop the current test run. If TestComplete is running tests matching a tag or a tag expression, it will stop the current test and cancel running the other matching tests.

    In addition, you can configure the following option:

    • Show notification message box on unhandled script extensions - If this option is enabled and an unhandled exception occurs in your script test, TestComplete will show a dialog informing you about the error.

      If this option is enabled, TestComplete ignores the On exception property of test items in your project. See Test Items Page (Project Editor).

      Notes
      • This option does not affect errors that occur in keyword tests.

      • This option does not affect errors posted by the TestComplete test engine (for example, error messages posted by the Log.Error method or object recognition errors). It affects only script exceptions, for instance, the “List index is out of bounds” exception.

  • Runtime

    • Minimize TestComplete - If the option is enabled TestComplete minimizes before the test playback. This stops TestComplete from overlapping the tested applications’ windows.

    • Use case-sensitive parameters - Sets whether methods that simulate user actions (ClickItem, DblClickItem, SelectItem and others) will process their string parameters as case-sensitive. These methods belong to objects that correspond to various controls supported by TestComplete (for instance, Win32ListView).

      To obtain the value of this option in scripts, use the Options.Run.CaseSensitive property.

    • Count processes of all users - If this option is enabled when launching the tested application, TestComplete will count all instances of the tested application running under different accounts. If the number of instances exceed the Count property of the tested application, new instance will not be launched. If this option is disabled, TestComplete will only count processes of the user for the account that the application is to be launched under. For more information on testing applications under different accounts, see Testing Applications Running Under Another User Account).

    • Disable mouse - If this option is enabled, the test engine disables the mouse when the test starts. That is, mouse movements will not cause the mouse cursor to move on the screen. This functionality lets you ensure that human intervention will not affect the simulated user actions during the test. The mouse is enabled after the test is over or if you press Ctrl+Alt+Del. See Disabling the Mouse Before Automated Testing for more information.

    • Auto-wait timeout, ms - Default: 10000. When a test gets a reference to a process or window object, or when it activates an object (for example, opening a minimized window), the object may not be available immediately. Similarly, when a test changes the onscreen state of a window (for example, an open window is minimized), or when attempts to close an unexpected window, the change may not occur instantaneously. Auto-wait timeout is the number of milliseconds TestComplete waits for an object to become available or for the object state to change before posting a timeout error message to the test log. If the object becomes available or the desired change occurs within the delay allowed, the test proceeds immediately. If the timeout elapses, the error message is posted to the test log. What happens next depends on the On error and On object recognition error properties.

      Auto-wait timeout affects the following test methods that return references to new objects:

      To change this option from your tests, use the Options.Run.Timeout property.

    • Delay between events, ms - Milliseconds to wait after the test simulates any user action (click, keystroke, window command, and so on) during playback. The default is 0; any positive integer can be specified to slow down test execution.

      To change this option from your tests, use the Options.Run.Delay property.

    • Key pressing delay, ms - Milliseconds to wait after each keystroke event is simulated by the test. Valid values range between 0 and 1000. 0 is the default.

    • Dragging delay, ms - Milliseconds it takes the mouse cursor to pass 20 pixels while performing a dragging operation during test playback. Valid values range between 0 and 1000. 5 is the default.

    • Mouse movement delay, ms - Milliseconds it takes the mouse cursor to pass 20 pixels during test playback. Valid values range between 0 and 1000. 0 is the default.

    Note: The Key pressing delay, Dragging delay and Mouse movement delay options do not affect simulating user actions in mobile applications.
  • Object search strategy - Specifies the order in which TestComplete traverses the object tree when searching for an object using the Find methods (Find, FindEx, FindChild, and FindChildEx). Depending on your application, changing this option can speed up the search.

    Possible values:

    • Depth-first - Search as deep as possible in each branch of the object tree before moving to the next branch. This is the default setting for projects created in TestComplete versions up to 11.

    • Breadth-first - Search level by level: start at a given object, search its direct child objects, then move to the next level child objects, and so on. This is the default setting for projects created in TestComplete 14.

    The images below demonstrate the difference in the search order:

    Depth-first search
    Depth-first search
    Breadth-first search
    Breadth-first search

    To change this option from your tests, use the Options.Run.ObjectSearchStrategy property.

    Note: This option does not affect Name Mapping. Extended Find always uses breadth-first search.

  • On unexpected window - The following options specify how TestComplete should respond to an unexpected window (for instance, an error window from the application). See Handling Unexpected Windows.

    Note: Handling unexpected windows does not work for windowless objects and for objects in mobile applications.
    • Ignore unexpected window - If this option is enabled, TestComplete simply ignores unexpected windows that occur during the test run. At that, the other options in this group will be ignored.

    • Stop execution - Ends the test run immediately. To read the option from scripts, use the Options.Run.StopOnUnexpWindow property.

    • Click on focused control - Simulates a mouse click on the control that has the focus within the unexpected window (it is often the OK button). To read the option from scripts, use the Options.Run.ClickOnButton property.

    • Press Esc - Simulates an Esc keystroke within the unexpected window (which should normally close it). To read the option from scripts, use the Options.Run.PressEsc property.

    • Press Enter - Simulates an Enter keystroke within the unexpected window. To read the option from scripts, use the Options.Run.PressEnter property.

    • Send the close command - Sends the close command to the unexpected window. To read the option from scripts, use the Options.Run.SendWMClose property.


  • On overlapping window - Such an event occurs when one or several windows are in front of the window addressed by the test. By default, TestComplete tries to bring focus to the desired window. However, some overlapping windows cannot be sent to the background (for instance, when the window is modal or has the "Always on top" attribute).

    Note: Handling overlapping windows does not work for windowless objects and for objects in mobile applications. See Handling Unexpected Windows for more information.

    The following option determines the TestComplete behavior in such situations.

    • Ignore overlapping window - When the option is disabled, TestComplete posts an error to the log and stops the test execution. If this option is enabled, TestComplete performs user actions at recorded coordinates (ignoring windows that overlap the control to be clicked or dragged) and proceeds with the test execution.

      To obtain the value of this option in scripts, use the Options.Run.IgnoreOverWindow property.

      Note: Keep in mind that when the option is enabled, the actions may be simulated on the overlapping window instead of the desired window.

  • Log

    • Post image on error - Specifies whether the test engine will post a desktop screenshot to the test log when an error occurs. This option also affects the Log.Error method. If you do not pass any image as a parameter to this method, and if the option is enabled, the method will post a desktop image to the test log. If the property is disabled, no image will be posted.

      Note: If a mobile device is connected to the test PC, the image posted to the test log will contain a screenshot of the mobile device desktop. That happens, because TestComplete recognizes the connected device as a default test platform. If you need the image of the PC desktop to be posted to the test log, disconnect the mobile device from the PC.
    • Save log every … minutes - Specifies the time interval, in minutes, in which TestComplete automatically saves test results when a script is being executed. This protects the test log against a crash or power outage. If the option is 0, the auto-save functionality is disabled.

      Note: The log saved during the test execution has the Incomplete status and is marked with a special icon. When the test execution is over, the incomplete log is replaced with a generic test log.
    • Store last … events - Specifies the number of the last event messages that must be posted to the test log before an error message is posted to the log. 0 means that all event messages must be stored.

      Use this option to remove unnecessary event messages from the log and reduce its overall size.

The default values of the Playback settings that will be used in new TestComplete projects are specified by the Default Project Properties - Playback Options dialog.

See Also

Running Tests
Handling Unexpected Windows
Default Project Properties - Playback Options
Project Properties

Highlight search results