So, as you write your tests and set it to run in your CI tool, sometimes only reading the log is quite difficult to understand what is going on, especially if you are not the one that wrote those tests.

Why not record this?

Luckly, ffmpeg provide a very simple way to do it

$ # list your devices
$ ffmpeg -f avfoundation -list_devices true -i ""
[AVFoundation input device @ 0x7ff9d6c01340] AVFoundation video devices:
[AVFoundation input device @ 0x7ff9d6c01340] [0] FaceTime HD Camera (Built-in)
[AVFoundation input device @ 0x7ff9d6c01340] [1] Capture screen 0
[AVFoundation input device @ 0x7ff9d6c01340] AVFoundation audio devices:
[AVFoundation input device @ 0x7ff9d6c01340] [0] Built-in Microphone

# run ffmpeg on background. -i "1" means i'm recordingn the Capture Screen 0
nohup ffmpeg -f avfoundation -loglevel error -i "1" output.mkv &


# stop recording
$ killall ffmpeg

As I am doing this on Azure Devops, which has a very POOR support for uploading artifacts, I’m uploading the file to somewhere

$ curl --upload-file ./output.mkv

Totally suggest as a command line upload service