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

Last updated: Apr 02, 2020 17:53

On an open device, you can inject an image to mock the use of the camera. This is helpful for testing application actions, such as focus or image placement, in apps that rely on camera usage, for example barcode readers or bank check scanning apps. Image injection supports uploaded images in .jpeg, .jpg, .png, or .bmp format. The file size cannot exceed 150 MB.

For image injection to work, the application to test must have been installed with sensor instrumentation enabled. In addition, the app needs to stay in the foreground.

Watch this short video to see how you can inject an image. For automated testing, you can use the existing Start Image Injection and Stop Image Injection commands.

To inject an image:

  1. On the open device, start the application you want to test and activate the camera. Make sure the app stays in the foreground.
  2. In the device toolbar, click the image icon .
  3. In the Inject image form, click ADD IMAGE and browse to the image file you want to use for testing.
  4. When the file has loaded, click INJECT IMAGE. The image should display in the app.
  5. Perform the required testing.
  6. When done, click the image icon  again and stop the injection.