RunRoutine Method

Applies to TestComplete 15.63, last modified on April 23, 2024

Description

Use the RunRoutine method to command TestComplete to execute the specified script routine. The method does not pause the program execution until the execution of the specified script routine is over. If the method cannot initiate the routine execution, an error occurs. You can handle it using the means of the scripting language you use (see Handling Exceptions in Scripts).

Declaration

IntegrationObj.RunRoutine(ProjectName, UnitName, RoutineName)

IntegrationObj An expression, variable or parameter that specifies a reference to an Integration object
ProjectName [in]    Required    String    
UnitName [in]    Required    String    
RoutineName [in]    Required    String    
Result None

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

ProjectName

Specifies the name of the project to which the desired routine belongs.

UnitName

Specifies the name of the script unit holding the desired routine.

RoutineName

Specifies the name of the desired script routine.

Result Value

None.

Remarks

Call this method only if TestComplete is not running any tests, else, an error will occur. To check whether TestComplete is running tests, use the IsRunning property.

The RunRoutine method does not pause the program execution until the routine's execution is over. To wait until the routine execution finishes, you can call the IsRunning property in a loop. See Working With TestComplete via COM for more information.

To obtain the value of the called script routine, use the RoutineResult property after the script run is over.

Example

For an example of how to use the RunRoutine method, see the Calling Script Routines via COM topic.

See Also

Working With TestComplete via COM - Overview
Calling Script Routines via COM
RunRoutineEx Method
RoutineResult Property
RunProjectSuite Method
RunProject Method
RunProjectItem Method
RunProjectTestItem Method
Halt Method
Stop Method
GetLastResultDescription Method

Highlight search results