Open bootstraponline opened 6 years ago
I would say it is the test runner
's job to record the test and EarlGrey is a framework to help you write the test. It is really a case-by-case strategy of how you would run your tests, record them and report. It is also a fact of how and where to upload your artifacts.
What is in your mind to record EarlGrey tests?
I was checking this out. Does ReplayKit allow you to download and save the captured video using an easy API? You're able to save it to the Camera Gallery.
I would say it is the test runner's job to record the test
EarlGrey is already recording the tests via screenshots though?
In general it looks like no one has solved this problem in open source for iOS. ReplayKit has API restrictions imposed by 🍎 that prevent seamlessly recording the screen to videos.
Seems like it's not a viable option though
If the preview is accessible from the app, we could automate this to close it out, which is still a good option.
also on iOS 11.0, this seems to be possible.
Interesting. I guess someone will have to investigate.
I like that EarlGrey provides screenshots on failures. I think videos would make it even better to diagnose broken UI tests.
I am working on some internal automation projects so I'm not sure when I'll have time to look into this. Just wanted to see if there was interest on the EarlGrey side.
https://github.com/uxmstudio/UIScreenCapture looks like one way to solve this.
For real device, it is possible to use MacOS's QuickTime movie recording API. With limitation of 1 device at a time because 🍎
fbsimctl can record everything but it doesn't work in a virtual machine. fbsimctl is able to record directly from the framebuffer so it's a bit nicer than quicktime.
I am also curious about the performance overhead for those two tools and among others, does anyone have any clue?
UIScreenCapture
is pretty bad (single digit FPS). FB is awesome and has minimal overhead but it's not an option since physical hardware is required. I'd expect the official Apple API to have the smallest overhead in VMs.
I like the fbsimctl one to record but I'm not sure details for the performance because I haven't measured it carefully.
Debugging UI tests successfully requires video recordings of individual test runs. Are there any thoughts about how to do this properly?
I have found this API from Apple