Over a million developers have joined DZone.

Gain CI Efficiencies: Test Advanced Functionalities on the Right Devices

DZone's Guide to

Gain CI Efficiencies: Test Advanced Functionalities on the Right Devices

Every new device seems to bring at least ten new advanced capabilities. Take a look at what you can do to test accurately.

· Performance Zone ·
Free Resource

Maintain Application Performance with real-time monitoring and instrumentation for any application. Learn More!

Does This Device Support the Feature I’m Testing?

FaceID, TouchID, location, camera, and conversational interfaces are offered on such a wide array of devices that it’s enough to make a testing professional dizzy. There’s a constant question buzzing in our testing minds: which device supports which feature?

The fragmentation and the level of support becomes increasingly complex over time with each operating system and hardware update. Testers spend precious time mapping and manually programming tests to run on specific devices based on feature capabilities. If they don’t do this time-consuming task, the result can be false failures due to testing features on non-supported devices.

Advanced Device Capabilities

Seeing the frustrations & pains experienced by testing customers led Perfecto to develop a new set of custom capabilities (built on Appium). This new feature set allows users to ensure the testing device(s) can support the requested functionality.

To see this in action, see the settings and example below:

Settings Description Key Value Type
Fingerprint support Whether the device supports the Set fingerprint feature. perfecto:fingerPrintSupport boolean
Motion notifications injection support Whether the device supports the Motion Notifications Injection feature. perfecto:motionInjectionSupport boolean
FaceID support Whether the device supports the Face ID feature. perfecto:faceIDSupport boolean
Image injection support Whether the device supports the Image Injection feature. perfecto:imageInjectionSupport boolean
Voice assistant inject support Whether the device supports the Voice assistant inject feature. perfecto:voiceAssistantInjectionSupport boolean
Force touch support Whether the device supports the Force Touch (3D Touch) feature. perfecto:forceTouch boolean
Set location support Whether the device supports the Set device location feature. perfecto:setLocationSupport boolean
Reboot support Whether the device supports the Reboot Device feature. perfecto:rebootSupport boolean

Figure 1: Advanced Capabilities to Select Device

Inside of a single script, naturally a tester can select a device based on a capability, for example:

  •  capabilities.setCapability(“platformName”, “Android”); 

  •  capabilities.setCapability(“manufacturer”, “Samsung”);  

  • capabilities.setCapability(“platformVersion”, “[56].*”); 

  •  capabilities.setCapability(“model”, “Galaxy.*”); 

  •  capabilities.setCapability(“perfecto:motionInjectionSupport”, true); 

Naturally, this can be parameterized so that the setting can be made at TestNG, or even in Jenkins.

In this example, we attempt to allocate a device only based on standard capabilities and attempt to inject text into Siri, which naturally fails. Instead, we add a new capability ‘perfecto:voiceAssistantInjectSupport’ = true, which reserves the right device and the scripts executes correctly.

Image title

Figure 2: Adding selection of device based on voice assistant capability

Big thanks to Daniel Tourgman for the awesome example!

Collect, analyze, and visualize performance data from mobile to mainframe with AutoPilot APM. Learn More!

performance ,testing ,device features ,device compatibility ,feature support

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}