OnTimeout Event

Applies to TestComplete 14.60, last modified on April 22, 2021

Occurs when a timeout expires in a project or in a project suite.

Declaration

OnTimeout(SenderParams) Parameters
Sender [in] Required Variant
Params [in] Required A TimeoutParams object

Description

The event occurs when a test item of a project or project suite runs longer than the timeout specified for that item in the Project or Project Suite editor.

Parameters

The event has the following parameters:

Sender

The Event control that processes the event.

Params

The Params parameter refers to the TimeoutParams object which provides information about the test item whose timeout exceeds. The object contains the following properties:

Property Description
Source Read-Only. Either “Project Suite”, or “Project” string. Use it to determine whether a project or project suite timeout occurs.
Name Read-Only. Specifies the test item name (the same string that is shown in the Name column of the Project editor) or the name of the project (the Name column of the Project Suite editor).
Break Read/Write.

If this parameter is True, TestComplete continues execution of the current iteration of the test item but cancels execution of the test item’s further iterations and its child test items.

Two notes (when the Break parameter is True):

  • TestComplete will stop test execution only after execution of the current iteration of the test item is over. If you need to stop execution of the test item immediately, call the Runner.Stop method with the CurrentTestOnly parameter set to True.

  • TestComplete will only stop execution for the current test item (or project). To stop the whole test run, call the Runner.Stop or Runner.Halt method within the OnTimeout event handler:

    Example

If the parameter is False, TestComplete does not break the execution of the currently running test item.

Remarks

  • When terminating the test item execution on a timeout, TestComplete terminates the tested applications that were launched from TestComplete. They are terminated before the OnTimeout event is generated. See Stopping Tests on Timeout.

  • For information on how to create an event handler for this and other TestComplete events, see Handling Events.

  • The OnTimeout event is not generated if there is not enough free disk space during the test run. See System Requirements.

See Also

OnStopTest Event
Handling Events
Event Control
Stopping Tests on Timeout

Highlight search results