To test your iOS applications, you need to deploy them to the device you are using for testing.
For TestComplete to be able to deploy a tested application to an iOS device, the application’s provisioning profile must permit deployment to this device. So, if you have the iOS Developer Program (not the iOS Developer Enterprise Program), you need to add the device to the provisioning profile you use. For more information on this, see Registering iOS Devices for Testing. Otherwise, you will get an error when trying to deploy your application to the device.
The iOS Developer Program is more common, so, most likely, you will need to follow the steps described in the topic mentioned above.
The In House profile supported by the iOS Developer Enterprise Program allows deploying applications to any device. If you use it, there is no need to follow the instructions described in the above-mentioned topic.
The application you launch from TestComplete must be signed with a development provisioning profile. If a distribution profile was used to sign it, you need to launch the application manually, or find a way to automate its start.
If you instrument your application in TestComplete, download the needed development provisioning profile from Apple’s Member Center and use it to instrument your application. See Get Certificate Files.
TestComplete projects include the Tested Applications collection that stores information on tested applications and helps you automate their start. To automate deployment and launch of your tested iOS applications, you need to add the application file (.ipa) to this collection and adjust some settings:
Add the needed iOS application archive files (.ipa) to the list of tested applications. You do this from the TestedApps editor. For detailed information, see Adding iOS Applications to the List of Tested Applications.
After you add your iOS application to the Tested Applications collection, make sure the Deploy to the device on start check box is selected in the Run-Mode Parameters section.
Now TestComplete will deploy the application to the tested device automatically when you launch the application from TestComplete or from tests.
If you configured your test project as described above, TestComplete will deploy the tested application to your iOS device automatically every time you launch the application with TestComplete.
To launch an application from TestComplete:
Right-click your application under the Your Project | TestedApps node in the Project Explorer panel and choose Run from the context menu.
– or –
Right-click the application in the TestedApps editor and choose Run selected from the context menu.
To launch all applications, choose Run All.
– or –
Open the Mobile Screen window, click Run Apps on the window toolbar and choose the desired application from the drop-down menu.
To launch an application from tests:
In scripts, use the
TestedApps.AppName.Run scripting method.
In keyword tests, use the Run TestedApp operation.
For more information, see Starting Tested iOS Applications.
TestComplete deploys your application to the iOS device that is set as current. This is a device that the Mobile Screen window shows or the device that you set as current in your tests by calling the
Mobile.SetCurrent method or the Select Device or Device Loop operation or in any other way.
If there is no current device at design time, TestComplete will display a dialog asking you to choose a device.
If there is no current device at run time, an error will occur.
If the device already has an earlier version of the tested application, it will be overwritten.