I’m sharing a two-part blog series titled '*Automa...
# compose
i
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
this is cool, thanks for sharing. do you know if there’s also a way to capture compose animations?
🙌 1
i
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
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
wishful thinking 😄
👍 1
c
FYI, articles, blogpost, etc. should be posted in #C0BJ0GTE2.
i
Oh sorry I will move it to the feed channel!
s
@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.
allo love 1