The Run TestedApp operation is used to launch one or all applications that are included into the tested applications list of your TestComplete project.
In order for you to be able to add the operation to a keyword test, the test project must contain the Tested Applications item.
If you launch all tested applications defined in your project, the operation does not return any value.
If the run mode is Simple or RunAs, the operation returns the
processobject that corresponds the application instance.
If the run mode is Profile, the operation returns the
AQtimeobject, which contains methods and properties relevant to the AQtime version that is specified by the application’s properties in the TestedApps editor.
If the launch fails, the operation returns an empty stub object. The
Exists property of this object returns False.
For information on how to obtain the result value, see Checking Operation Result.
The operation cannot have child operations.
When you add the operation to your keyword test, TestComplete displays the wizard that contains two pages:
Specify Tested Application
On this page you specify the tested application which will be launched by the operation. The page contains the list of applications that are added to the tested applications list of your project. Select the application you need to launch and press Next to continue.
The list also contains the All Applications item. By selecting it, you specify that the operation must run all the applications.
On this page you can specify the parameters of the run. Note that the parameters are shown only if you chose an application in the Specify Tested Application page. If you chose the All Applications item, the page appears empty.
|Note:||These parameters are ignored for ClickOnce and Web tested applications.|
Integer. Specifies the number of application instances to be launched.
If Count is -1, the number of application instances launched by the operation corresponds to the number specified in the application’s Count property in the TestedApps Editor.
The number of launched instances depends on the IgnoreRunning parameter. If this parameter is True, the operation launches as many instances as it is specified by the Count parameter. If IgnoreRunning is False, Count specifies the total number of instances that should exist and the operation launches only the lacking instances. For instance, if IgnoreRunning is False, Count is 5 and there are two applications instances running in the system, the operation will launch 3 instances (5 - 2 = 3), but not 5.
The Run TestedApp operation depends on the properties of the tested applications that are specified in the TestedApps Editor.
If the Launch application from tests setting is disabled for the application in the TestedApps Editor, the application will not be launched.
To launch web browsers, it is recommended that you use the Run Browser operation.
Sometimes the Run TestedApp operation may hang the application. The fact is that to obtain the application’s process, the operation uses the
WaitForInputIdlefunction of Windows API. When this function hangs, the operation hangs as well. To avoid this behavior, use the following workaround: create a batch file (.bat) that will call your application and add this file to the list of tested applications instead of the application.
Running a tested application in RunAs mode requires that the Secondary Logon service be running in Windows.
To launch a tested application in Profile or RunAs mode, TestComplete must be running with administrator permissions. See Using TestComplete With Administrator Privileges.
When launching an application with administrator privileges, the operating system displays a dialog box asking for your permission to run it. Due to certain limitations, the closing of this dialog box cannot be automated. You should close it manually, or modify User Account Control settings so that Windows does not display the dialog. See Using TestComplete With Administrator Privileges.
Test Actions Category
Specifying Operation Parameters
Checking Operation Result
Run Code Snippet Operation
Call Object Method Operation
About Tested Applications
Running Tested Applications
Run Browser Operation