The Integration object has methods and properties you can use to command TestComplete via COM. This topic explains which properties and methods you can use for the most basic testing tasks:
| Action | Description | ||
|---|---|---|---|
| To open a project… | Use the Integration.OpenProjectSuiteExmethod.To open a project, you open its project suite. Also, this method allows you to automatically convert project suites and projects created in earlier TestComplete versions to the current version at opening. To check whether TestComplete has an open project suite, call the  To get the name of the currently open project suite, use the  | ||
| To enable or disable test items… | To get access to a project’s or project suite’s test items, use the Integration.TestSuiteproperty. This property returns a test items collection of the specified project or a test items of the currently opened project suite.Using properties of this collection, you can access the desired test item and modify its properties (name, description, timeout, enabled\disabled status and others). | ||
| To get a list of script routines… | Use the Integration.ProjectRoutinesIteratorproperty. This property returns the specified project’s collection of script tests.Using properties of this collection, you can enumerate the script tests and get information about them. | ||
| To run a test… | Use one of the following methods of the Integrationobject:
 Before calling any of these methods, make sure TestComplete is not running any tests. To do this, use the  If you call these methods when TestComplete is running tests, an error will occur. Each of these methods returns after the test run was started or after the tests failed to start. They do not pause the program execution until the test run is over. To wait for the test end, you can check the result of the  | ||
| To get a program object… | To get program objects, such as Sys,Log,Runner,Regionsand others, use theIntegration.GetObjectByNamemethod.
 | ||
| To export the test results… | To export the results of the last test run, call the Integration.ExportResultsmethod. | ||
| To stop a test run… | To stop the test that is running in TestComplete, call the Integration.StoporIntegration.Haltmethod. These methods perform the same action. The difference between them is thatHaltposts the string passed to it as a parameter, to the test log as an error. | ||
| To check results… | To check whether the last test run finished successfully, call the Integration.GetLastResultDescriptionmethod. This method returns theIntegrationResultDescriptionobject which properties and methods lets you determine whether the last test run was successful. | 
See Also
Integration Object
Integration Object Properties
Integration Object Methods
Working With TestComplete via COM - Overview

