RunProjectItem Method

Applies to TestComplete 15.68, last modified on October 16, 2024

Description

Use the RunProjectItem method to execute test(s) provided by the specified project item. The method does not pause the program execution until the test run is over. It returns immediately after the test run started. If the method cannot initiate the test run, an error occurs. You can handle it using the means of the scripting language you use (see Handling Exceptions in Scripts).

Declaration

IntegrationObj.RunProjectItem(ProjectName, ProjectItemName)

IntegrationObj An expression, variable or parameter that specifies a reference to an Integration object
ProjectName [in]    Required    String    
ProjectItemName [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 project item belongs.

ProjectItemName

Specifies the name of the desired project item.

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.

RunProjectItem returns immediately after the test run has started or if it has failed to start. The method does not pause the program execution until the test run is over. To wait until the test run finishes, you can call the IsRunning property in a loop. See Working With TestComplete via COM for more information.

See Also

Working With TestComplete via COM - Overview
RunProjectSuite Method
RunProject Method
RunProjectTestItem Method
RunRoutine Method
RunRoutineEx Method
Halt Method
Stop Method
GetLastResultDescription Method

Highlight search results