Page tree
Skip to end of metadata
Go to start of metadata

Instrumentation is a process to prepare the application for testing or automation. Part of the instrumentation process, may add "instruments" that allow the testing framework to gain access to parts of the application.

Perfecto provides tools for instrumenting mobile applications for different purposes:

Instrumenting Hybrid Applications

Hybrid applications, applications that display parts of the UI in WebView objects, require basic instrumentation to provide access to the parts of the UI hosted in the WebView objects.

Perfecto supports three types of instrumentation:

  1. On-the-fly instrumentation (iOS and Android)
    • This instrumentation is performed when installing the app on the device. Perfecto Mobile updates the instrumentation library but the customer needs to re-install the app after every version update and not to use previously installed app.
  2. Framework instrumentation (only for iOS)
    • This instrumentation is performed by the app developer as part of compiling the app. A new framework instrumentation library has to be downloaded by the customer every version from here.
    • Customers need to download and re-instrument after every Perfecto version update.
  3. Offline instrumentation (only for Android)
    • This instrumentation is performed on the application apk file, and generates an instrumented apk file that can be stored by the user and later installed directly onto the Android device.
    • Customers need to download a new version of the "Perfecto-Lib" and re-instrument after every Perfecto version update.

Hybrid application instrumentation notes:

  • Instrumentation is required to gain access to DOM objects in Hybrid apps.
  • As a general rule, on-the-fly instrumentation is preferred over framework instrumentation.
  • Perfecto also supports instrumentation for MultiDex apps (Android) and for Swift apps (iOS), in addition to SingleDex and Objective-C apps.
  • In iOS, IPA name should not contain brackets.

Camera Instrumentation

Perfecto supports an image injection feature that simulates image input from the device camera. The application must be prepared for image injection during the installation process.

To prepare the application properly:

  • Manual testing - install the application using the Install app widget. After providing the application's repository location, Several instrumentation options are offered. The second instrumentation is camera instrumentation - set the value to True.
  • Perfecto Automation/UFT - use the Install application function and set the camera Instrumentation parameter to true.
  • Selenium - set the "cameraInstrumentation" parameter of the mobile:application:install Perfecto command to true.
  • Appium - set the "cameraInstrument" capability to true, when starting the application from the driver creation.

Fingerprint Instrumentation

Important note: This functionality is supported for Early Access customers. If you are interested in joining the Early Access program, contact your CSM.

Perfecto supports a fingerprint simulation feature that simulates an authorization analysis using the device fingerprint reader. Using this feature requires that the application that accesses the fingerprint reader be instrumented to let the test/automation script to identify the activation of the fingerprint reader.

To prepare the application properly: 

  • Perfecto Automation - use the Install application function and set the fingerprint Instrumentation parameter to true.
  • Selenium - set the "instrument_fingerprint" parameter of the mobile:application:install Perfecto command to true.
  • Appium - set the "fingerprintInstrument" capability to true, when starting the application from the driver creation.

Known Limitations

  • Currently, Xamarin-based applications for Android cannot be instrumented by the Perfecto tools.