Skip to main content

Camera image injection

This document provides details about the camera image injection feature of Katalon TestCloud.

Prerequisites

The Camera image injection function supports the following systems and interfaces:

  • iOS: 13 or higher.
    • The didFinishPickingMediaWithInfo class of UIImagePickerController iOS SDK class for capturing an image. See: Apple documentation.
    • The AVCapturePhoto iOS SDK class for receiving captured photos from AVCapturePhotoOutput class. See: Apple Documentation.
  • Android: 9 or higher.

One limitation of testing with cloud-based mobile devices is the ability to capture images. Camera image injection tackles this issue by simulating the action of taking images through a mobile application.

Some common use cases of camera image injection are:

  • Scanning a check for a banking application.
  • Scanning a QR code.
  • Taking a user profile picture.
  • Taking a photo and store in a gallery app.
note
  • Video capture and other media types are currently not supported.
  • For iOS apps signed with Enterprise Certificates, app resigning (a prerequisite for using the Image Injection tool) is not available.

To perform image injection, you need to specify the desired capability and prepare the images. Follow these steps:

  1. In Katalon Studio, click the Profile drop-down and select Reload Plugins to check that the plugin is installed.
  2. Go to Project Settings > Desired Capabilities > TestCloud.
  3. In the TestCloud table, add a katalon:options property, set Type as Dictionary, then click the ....
  4. In the Dictionary Property Builder dialog, add the boolean property enableImageInjection=true. Then click OK.
  5. Save the images that are required for image injection in the Data Files/TestCloud folder of your project. The images must be in PNG, JPG, or JPEG formats, and does not exceed 4.5 MB.
  6. Add the CameraImageInjectionExecutor.injectImage keyword to your test case.
  7. Configure your TestCloud environment and run the test.
Was this page helpful?