For most of the usage cases there is no need to 'prepare' the application under test.
You can use your application as is, and even test application that are downloaded from the App Store.
In other cases (that are listed below) an instrumentation is required. Instrumentation is referring to a process where testing code is running in the application process.
Anyway, the instrumentation process doesn't require the code of the application but just the compiled artifact (IPA / APK files).
The cases that instrumentation is required:
- Application that contain WebView (Hybrid application).
- Application with non standard UI elements.
- Give you more option to identify elements.
- Enable you to execute your tests faster.
- Use some advance coverage feature like camera image injection, telematics, integration with Siri...