Skip to main content

Camera image injection

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

  • You have installed the Katalon TestCloud Keywords plugin. If you have not, visit Katalon Store: Katalon TestCloud keywords.

  • Camera image injection 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.

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 make sure 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. In the Dictionary Property Builder dialog, add the boolean property enableImageInjection=true. Then click OK.
    Add enableImageInjection in Dictionary Property Builder dialog
  6. 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.Katalon Studio Data Files/TestCloud
  7. Add the CameraImageInjectionExecutor.injectImage keyword to your test case as needed.
  8. Configure your TestCloud environment and run the test.
Was this page helpful?