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.OpenProjectSuiteEx method.
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.TestSuite property. 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.ProjectRoutinesIterator property. 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 Integration object:
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 , Regions and others, use the Integration.GetObjectByName method.
|
||
To export the test results… | To export the results of the last test run, call the Integration.ExportResults method. |
||
To stop a test run… | To stop the test that is running in TestComplete, call the Integration.Stop or Integration.Halt method. These methods perform the same action. The difference between them is that Halt posts 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.GetLastResultDescription method. This method returns the IntegrationResultDescription object 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