Skip to content

Screenshots #364

Open
Open

Description

@lukepighetti

So I've used this to setup an integration testing pipeline, which I love! However, when my tests fail, I'm not easily able to see what's on the screen of the simulator at time of failure. While I understand this might be out of scope for this action, do you have any suggestions for how to handle this?

Activity

  1. self-assigned this
    on Jun 4, 2023
  2. dotdoom commented on Oct 22, 2023

    @dotdoom
    Member

    I guess this would be some wrapping around xcrun screenshot or xcrun recordVideo.

    Taking a screenshot should be trivial, just running the command

    $ xcrun simctl io booted screenshot error.jpg

    as suggested in Capture iOS Simulator video for App Preview, and then uploading it with e.g. actions/upload-artifact or an artifact uploading action of choice.

    Video is likely more useful. The problem with video is that the command needs to be stopped. This can be achieved by starting xcrun in background (e.g. xcrun ... &) and then stopping it later with SIGINT (rough equivalent of Ctrl-C) via pkill -INT xcrun in an if: always() action. It's a bit hacky, so I agree providing some instructions would generally be helpful. Agreed this is a stretch for the scope, but I won't mind poking at it once I am back to iOS development. Iterative contributions also welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions