RunProjectTestItem Method

Applies to TestComplete 15.69, last modified on November 13, 2024

Description

Use the RunProjectTestItem method to run a test item specified in your project. The method does not pause your application run until the test item run is over. It returns immediately after the test run starts.

Declaration

IntegrationObj.RunProjectTestItem(ProjectName, ProjectTestItemName)

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

ProjectTestItemName

Specifies the name of the desired test item.

Result Value

None.

Remarks

  • If the method cannot initiate a test run, an error occurs. You can handle this using the means provided by the scripting language (see Handling Exceptions in Scripts).

  • If there are several test items with the same name in your project, the method will run the first item it finds. Make sure that test items have unique names in your project.

  • If the needed test item is disabled, the method will not run it.

  • Only call this method if TestComplete is not running any tests. Else, an error will occur. To check whether TestComplete is running tests, use the IsRunning property.

  • The method returns immediately after the test item starts or if it fails to start. To wait until the test item run finishes, you can call the IsRunning property in a loop. See Working With TestComplete via COM - Overview for more information.

See Also

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

Highlight search results