Get high quality with correct frame rate video recording on iOS


I am creating Appium Python tests on Device Farm on both Android and iOS. I need to record the screen with a correct and constant framerate. The speed of the video recorded by device farm does not match reality. For Android I solved by creating the video with appium and it seems fine, but for iOS there seems to be a frame rate problem. I tried recording video using Control Center Screen Recorder directly on an iPhone I have and the video looks good, but I need to find a way to move the video file from AWS iPhone Photos to the S3 bucket where I'm uploading all the results of the test. I tried using the appium pull_file method, but it fails. Is there a way in the device farm to navigate iPhone files or use iCloud or use Photos to import files or anything else? Or a different way to record the video? I would appreciate any ideas. Thanks in advance

asked 2 months ago92 views
1 Answer

There are a few options to consider for recording video of your iOS tests on Device Farm:

  • Use the ScreenRecording API built into the XCUITest framework. This allows programmatically starting and stopping screen recordings directly from your tests.
  • Leverage the built-in Screen Recording feature on iOS devices. You can start a recording, run your tests, then access the video file via the Photos app or iCloud Photo Library.
  • To download files from an iOS device on Device Farm, you can use the pull-file capability of the Appium Python client. Make sure the file is in a shared location like the Documents folder before attempting to pull.
  • As an alternative, consider using a commercial cloud-based screen recording service that integrates with Device Farm. Some services allow configuring recordings programmatically which may avoid issues with downloading files directly.
  • If downloading files is critical, one option is to run your iOS tests remotely on real devices using services like Bitbar rather than Device Farm. This would give you full access to files on the device under test.
profile picture
answered 2 months ago
  • Thanks for your response. Point by point:

    1. ScreenRecording API built into the XCUITest framework: Appium uses XCUITest driver so the frame rate issue should remain even if I use XCUI directly. Could you give me an example to record video with the correct frame rate so I can try it?
    2. Screen Recording feature on iOS devices: ok, it's the try I talked about. How can I access the video file via the Photos app or iCloud Photo Library? Is iCloud active in device farm? I tried to use osxphotos library, but it doesn't see iPhone photos nor videos.
    3. pull-file capability of the Appium Python client: I tried driver.pull_file('') and some variations but it returns "object not found" or "failed to receive any data". How should I use it?
    4. commercial cloud-based screen recording service: which one?
    5. Bitbar: we have already purchased some device slots, so we will not change for now.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions