Cross-Mobile Scripting
An Eggplant Functional (EPF) script (not including the images) can typically be used across all mobile devices with little or no modification. This is because the script simply describes the user workflow, and app creators try hard to keep this workflow consistent across all mobile devices.
Reference images can also often be re-used across different mobile devices and operating system versions, but sometimes references will have to be different for different devices. This document describes the situations in which different reference images will be required, and presents best practices for efficient cross-mobile scripting.
When Are Different Images Required?
There are three situations that typically lead to different reference images being required between two devices:
- Devices in different device families render images differently (e.g., with different smoothing effects), so different reference images are required.
- Devices in the same device family, but with different screen resolutions, will render images that include text differently. So if a reference image includes text, and two devices have different screen resolutions, then they will need to use different reference images.
- Major version changes of the operating system (OS) will often change the look-and-feel of native applications, like Settings or Messaging. So reference images related to native applications might have to be different for devices using different major OS versions.
Despite the above three situations, a huge amount of image re-use is possible, making cross-mobile scripting with Eggplant Functional very productive. For example, images for your application can typically be re-used across all OS versions within a single device family.
Device Families
Device families are sets of mobile devices that use the same basic OS and UI layer, and so render images the same way. They can re-use the same reference images unless the devices have different resolutions and the reference image includes text, or the reference image is for a native application and the devices have different major OS versions.
To make it easy to test against multiple devices and device operating systems, Eggplant Functional supports connections to Sauce Labs. Sauce Labs provides a virtual device compatibility lab so that you don't have to own the devices yourself. Click Here for more information.
The table below shows the most popular device families, further partitions these by resolution, and gives advice for re-using images.
| Family | Resolution | Devices | OS Version | Best Practice |
|---|---|---|---|---|
| Samsung Galaxy | 1080*1920 | S4, S5 | 4.1, 4.2, 4.4, 5.0, 5.1 | The same images can be used with tolerances raised slightly. Use images captured on the S5 for consistency. |
| 720*1280 | S3 | 4.1, 4.2, 4.4, 5.0, 5.1 | A single image can be captured for this device to work across all OS versions. | |
| 1440*2560 | Nexus 6 | 4.1, 4.2, 4.4, 5.0, 5.1 | The same images can be used, along with using scaling, as long as the images do not include text, where OCR can be used. Images should be captured on the Nexus 6 and scaled down for the Nexus 5. | |
| 1080*1920 | Nexus 5 | 4.1, 4.2, 4.4, 5.0, 5.1 | same as above | |
| iPad | 1536*2048 | Mini, 3, Air, Air 2 | 8.1, 8.2, 8.3, 8.4 | The same images can be used with tolerances raised slightly. Use images captured on the Air 2 for consistency. |
| iPhone | 1080*1920 | 6 Plus | 8.1, 8.2, 8.3, 8.4 | The same images can be used, along with using scaling, as long as the images do not include text, where OCR can be used. Images should be captured on the iPhone 6 Plus and scaled down for the iPhone 6. |
| 1334*750 | 6 | 8.1, 8.2, 8.3, 8.4 | same as above | |
| 640*1136 | 5S, 5, 4S | 8.1, 8.2, 8.3, 8.4 | The same images can be used with tolerances raised slightly. Use images captured on the 5S for consistency. |
Note again the huge amount of image re-use which is possible. Not only can you use the same images for all devices within a device family, you can also use the same images across all OS versions. This means that with just 8 reference images as shown above, you can cover 61 different combinations of device and OS version.