https://kotlinlang.org logo
#compose
Title
# compose
t

Tom De Decker

11/09/2023, 1:56 PM
Is it possible to generate images for preview-tagged composables outside of Android Studio (e.g. through a gradle job)? The use-case would be to generate these images as part of our CI process so we can monitor visual changes over time without having to setup any extra infrastructure
t

Thomas Urbanitsch

11/09/2023, 2:20 PM
so you are looking for snapshot testing? -> https://github.com/cashapp/paparazzi
t

Tom De Decker

11/09/2023, 2:23 PM
Basically this but I'd hoped that we could just reuse our current
@Preview
annotated composables to get halfway there without extra implementation work
t

Thomas Urbanitsch

11/09/2023, 2:36 PM
just stumbled across this, not sure that would help: https://codedogg.wordpress.com/2023/03/26/compose-paparazzi-automatically-find-preview-composables-at-runtime/ We also haven’t use showkase, not sure if that includes what you are looking for
t

Tom De Decker

11/09/2023, 2:38 PM
Those are useful suggestions, I'll look into them! Thanks!
🤞 1
j

Jonas

11/10/2023, 5:57 AM
We use Showkase combined with Papaparazzi. Google also announced that they will release screenshot testing capability with the AGP at the last Google IO. Still waiting… 😅
2 Views