Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Conversation

@eleventigerssc
Copy link

Even though Spoon provides GIFs for quick glance over test flows I found it useful to be able to record videos that capture the whole device screen. When investigating test flakiness caused by various Android system UI popup interruptions - videos help to diagnose the root cause quickly.

I have been running a variant of the proposed screen recorder on the instrumentation side using executeShellCommand successfully however I wanted something more reliable - something that is controlled by the host runner. It appeared to me that this multi segment screenrecord command approach can be executed on the spoon-runner side so I thought why not try that!

This PR adds an optional (disabled by default) video recording functionality that, when enabled, produces videos in the mp4 format that get attached to test reports. Since Android's screenrecord command can record only up to 3 minutes ScreenRecorder class takes care of executing the command multiple times sequentially. If multiple video files are produced (long test case) they are pulled from the device and Google's isoparser library is used to combine all files into a single, continuous video.

@eleventigers
Copy link

@JakeWharton since this PR has been opened quite a while ago I am wondering if it should be closed or updated?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants