I’m sharing a two-part blog series titled '*Automating UI Change Verification with Android Compose Screenshot Testing.*'. Part 1 covers Compose Screenshot Testing. Part 2 explains how to automate this testing using GitHub Actions. I hope this series will be helpful for those considering screenshot testing!
Moved to the #C0BJ0GTE2 channel. 🙏
m
Mărcuţ Andrei
02/10/2025, 3:14 PM
this is cool, thanks for sharing. do you know if there’s also a way to capture compose animations?
🙌 1
i
Isaac
02/10/2025, 3:19 PM
Thank you for your interest! simple smile Since compose animation is a video rather than a single captured moment, it might be difficult to take a screenshot. I haven't tried it myself, so I'm not sure if there's a way to do it.
m
Mărcuţ Andrei
02/10/2025, 3:22 PM
the animation can be previewed from Android studio so I thought, since we can capture a screenshot, maybe there’s already a way also to also capture an animated composable
Mărcuţ Andrei
02/10/2025, 3:23 PM
wishful thinking 😄
👍 1
c
Chrimaeon
02/10/2025, 3:35 PM
FYI, articles, blogpost, etc. should be posted in #C0BJ0GTE2.
i
Isaac
02/10/2025, 3:36 PM
Oh sorry I will move it to the feed channel!
s
Skaldebane
02/12/2025, 2:57 AM
@Mărcuţ Andrei Not sure about Android, but it's possible to do on other platforms (e.g. desktop, as well as other skiko platforms).
You can use a
ImageComposeScene
, advance its time (e.g. if you want 60 fps, you'll wanna advance by 16ms each step), then render each frame into a picture and save it.
That way you'll have a bunch of pictures representing each frame, and you can use a tool like
ffmpeg
with the right incantations to turn them into a video file.