Last updated: Sep 09, 2019 14:38
Injecting an image
Different mobile applications employ the builtin device camera to "look" at the outside world and perform different operations based on the image that the camera records. Examples of this would be a barcode-reader application, or a bank check scanning application.
When testing these applications using a Perfecto Lab device, you need to provide the application with an image that mocks the use of the camera. This is supported by Perfecto's image injection.
To start image injection:
- Manual testing - use the Inject image widget, provide the Repository location of the image to use, and the application identification information.
- Perfecto Automation - use the Start image injection function (under Device/Image injection) and supply the image's Repository Key.
- UFT - use the StartImageInjection function and supply the image's Repository Key.
- Selenium/Appium - use the mobile:image.injection:start Perfecto command (using executeScript) to supply the image's Repository Key.
Installing the application
To support this feature, the application must 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, there are two steps of instrumentation. The first instrumentation step is for object instrumentation and not affected by this functionality. The second instrumentation is sensor instrumentation - set the value to True.