To prepare (or instrument) your iOS applications for testing, you need to prepare them in a special way.
Do not submit instrumented applications to the App Store. Instrumented applications use private APIs and will be rejected. Create a separate build configuration for test builds.
Why Preparation Is Needed
The preparation (or instrumentation) of tested iOS applications is mandatory. You cannot test iOS applications without preparing them for TestExecute.
If an application has been prepared, the test engine recognizes individual controls in that application and can use control-specific methods and properties to simulate user actions on controls.
You can instrument your tested iOS application in Xcode, in TestComplete UI, in your test scripts. To learn about two latter options, please see the TestComplete documentation.
What Instrumentation Means
To instrument an iOS application, you need to compile it with the TestComplete-agent-static.a library. This library is part of the TestComplete package. You can find it in the <TestComplete>\Bin\Extensions\iOS folder.
In addition, you need certain certificate files for validating the application after you recompile it (see below).
During the instrumentation, TestComplete does not change the application’s source code.
TestComplete does not change your application in any way, except for signing it with new developer certificate files and compiling in the library. It does not change the binary code of your functions, it does not change resources and text constants in your code. In other words, instrumentation does not change the application’s functionality.
Instrumented applications consume a bit more memory on the device due to the library code, which TestComplete adds to them.
You cannot undo instrumentation. If you need an uninstrumented version of your application, restore it from the backup copy.
What Are Developer Certificate Files
To run tests against the iOS application, it must be verified as created by a trusted developer and designated to run on the specified test devices. Developed certificates do this.
In Xcode and Xamarin Studio, you can choose what certificates to use (they will use the certificate data stored on your Mac computer). The test engine does not have access to this data, so you need to export them to instrument the application. For detailed information on these files and the way to obtain them, see Get Certificate Files.
Recommended Provisioning Profile
To perform testing with TestExecute, we recommend that you use the iOS App Development profile for your applications. In this case, you will be able to automate the deployment of the tested applications to your iOS devices and launching the applications on them.
If you use a distribution profile, you will be able to automate application deployment to your devices. However, you will be unable to launch your tested applications on devices from your tests. You will have to launch the applications manually, or find a way to automate their start.
TestExecute does not support testing iOS applications signed with the App Store profile.
You can instrument your iOS applications:
Note: In addition, you can instrument your iOS applications in TestComplete and from your tests. To learn how to do it, please see the TestComplete documentation.
Other Preparatory Actions
In addition to instrumenting the application, you also need to prepare the TestExecute computer and your iOS device. For complete information on these actions, see the other topics of the Preparing for Running Tests on iOS Devices section.
Known Issues and Limitations
After you update TestExecute, you need to reinstrument your iOS applications for the new TestExecute version.
If you use the current version of TestExecute with applications instrumented for previous TestExecute versions, your device may stop responding. If this happens, restart the device by holding down the power and home buttons for about 10 seconds.
We recommend that you update your iTunes to the latest version before running tests on iOS devices. Older versions of iTunes may cause issues in your tests.
Xamarin applications built to support both 32-bit and 64-bit platforms will not run on 32-bit platforms if they are instrumented in TestComplete. Instrument such applications manually in Xamarin Studio.
You cannot instrument applications downloaded from the App Store.
Do not submit TestComplete-enabled builds to the App Store. The TestComplete Agent library uses private APIs, so the applications that use it will be rejected. Create a separate build target for test builds.