The following table lists the requirements for iOS testing:
Requirement | Description |
---|---|
Instrumentation of iOS apps | To record and play back tests of a native or hybrid iOS application, you will need an instrumented version of the application under test (AUT). If this is not available, you will need to instrument the AUT on a Macintosh computer that contains the Xcode source project for the AUT. For details, see Instrumenting iOS applications. If you do not have the Xcode source project for the AUT, you must obtain the instrumented version of the AUT from a developer and install it on your Macintosh, Windows, or Linux computer. For details, see Installing instrumented iOS applications. |
Licensing for team members | All team members must have an Apple Developer ID and share the same Apple Developer or Enterprise License. |
Licensing for iOS devices | Each iOS device must be registered with the same Apple Developer or Enterprise License. Each iOS device requires one or more Provisioning Profiles. The Provisioning Profile includes information about the Developer IDs, the Apple License, and the registered iOS devices, and enables a device to be used for testing. |
You can test native, hybrid, and web applications on an iOS device using the browser-based client for iOS. This client is a web application that runs in the Safari or Chrome browser on your device. To run the client, simply type the Workbench URL in the following format in a browser on your device:
Format: http://Workbench_URL:port/mobile
Example: http://9.11.22.333:7878/mobile
The following figure shows the mobile test client in a browser on an iOS device:
Here are some important details about the browser-based client:
Whenever an application under test is started. it opens as a URL in a new browser tab. The blank screen that is shown is actually a new tab and is shown temporarily before the launch.
You can also do your testing using the Safari browser in the iOS Simulator, or you can use the native mobile test client in the Simulator after following the installation instructions at Installing the mobile test client on the iOS Simulator. Chrome is not currently available on the iOS Simulator.
When using the mobile test client on an iOS device, be sure to enable pop-up windows. Pop-up windows must be allowed for the Workbench IP address. Safari silently disables pop-up windows, while Google Chrome prompts you to allow pop up windows. For every device-specific operation (install, record, playback), Safari prompts with a pop-up confirmation. There are fewer messages with Chrome.
When you are ready to run your tests, you can initiate the test run from the device or the test workbench. In either case, the test actually runs on the device. To give control to the test workbench, simply tap Enter Passive Mode on the mobile test client.
Passive mode behavior is browser-specific. While Chrome operates in passive mode as expected. Safari is more restrictive and displays multiple passive mode confirmation dialog boxes.
When you connect a particular device, such as an iPhone, to the test workbench, you can view the connection in the Mobile Devices editor in the test workbench.
To differentiate among multiple iPhones that are connected to the test workbench, you can change the Device Description.
This opens the mobile test client.
You can see the result in the figures below.
Before | After |
---|---|
The mobile web recorder is an iOS application that is required to record and play back user actions of a web application under test. It is invoked automatically during the recording and playback process. You can download the mobile web recorder from the Apple App Store. When you are done testing, you can stop the mobile web recorder using the standard Apple Activity Monitor.
Before you can test a mobile application, the application must first be instrumented. An instrumented application contains the application under test augmented with code that allows you to record or play back a test.
A native iOS application is a complete iOS project in Xcode. The build and compile process to instrument the application takes place entirely in Xcode on a Macintosh computer. One, single application is created for both recording and playback.
The following figure shows the build chain for a native iOS app on a Macintosh computer: