Stop Execution Operation

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

Description

The Stop Execution operation stops the whole test run or the execution of the current test.

Operation Result

The operation does not return any value.

Scripting Analogue

The operation performs the same actions as the Runner.Stop scripting method. To post an error message to the test log before calling Runner.Stop, use the Log.Error method.

Child Operations

The operation cannot have child operations.

Operation Parameters

The operation parameters are organized into the following pages:

Details

This page contains the following parameters:

  • Error message - Specifies the text of the error message that will be posted to the test log before the operation stops the test execution.

  • Stop current test only - Specifies whether the operation will only stop the current test or the entire test run.

    If this check box is selected, then the operation only stops the given test (if you execute the test as part of the project test, child test items will also be stopped).

    If the check box is clean, the operation stops the entire test run (for instance, if you are running a project or project suite, the operation will stop the project or project suite run).

Operation Parameters

This page contains the same parameters that you specified on the Details page. However, it lets you use variables, test parameters, code expressions or [Last Operation Result] values to specify these parameters.

ErrorMessage

String. Analogue to the Error Message edit field.

CurrentTestOnly

Boolean. Analogue to the Stop current test only check box.

For detailed information on working with the Operation Parameters page, see Specifying Operation Parameters.

Remarks

TestComplete generates the OnStopTest event when you stop the test run using the Stop Execution operation. You can create a handling script routine for this event to perform specific actions when the test stops.

See Also

Statements Category
Specifying Operation Parameters
Stop Method
Error Method
OnStopTest Event
Running, Pausing and Stopping Automated Tests

Highlight search results