Let's @Preview the Future: Automating Screensho...

Let's @Preview the Future: Automating Screenshot Testing in CMP

Compose Multiplatform is gaining serious traction. With iOS support recently declared stable and Android Studio Narwhal introducing @Preview support for shared Composables in common, the ecosystem is evolving rapidly.

While @Preview is traditionally used for visual checks during UI development, what if we could transform these @Previews into powerful automated visual tests?

That's exactly what we'll explore in this talk. We'll:
- Briefly introduce screenshot testing and its key benefits
- Show how any Compose Multiplatform @Preview can become an automated screenshot test
- Walk through the full process with live coding examples

After this session, you’ll have a solid grasp of how to level up visual testing in your Compose Multiplatform projects.

Sergio Sastre Flórez

May 29, 2025

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

25 slides
  1. @Gio_Sastre ANDROID @Preview @Preview @Preview COMMON widthDp heightDp widthDp heightDp

    fontScale locale uiMode device wallpapers apiLevel @Preview systemUi showBackground backgroundColor name group name group fontScale locale device @Previews in CMP DESKTOP @Preview widthDp heightDp name group showBackground backgroundColor locale
  2. @Gio_Sastre ANDROID @Preview @Preview @Preview COMMON widthDp heightDp widthDp heightDp

    fontScale locale uiMode device wallpapers apiLevel @Preview systemUi showBackground backgroundColor name group name group fontScale locale device @Previews in CMP DESKTOP @Preview widthDp heightDp name group showBackground backgroundColor locale
  3. @Gio_Sastre ANDROID @Preview @Preview @Preview COMMON widthDp heightDp widthDp heightDp

    fontScale locale uiMode device wallpapers apiLevel @Preview systemUi showBackground backgroundColor name group name group fontScale locale device @Previews in CMP DESKTOP @Preview widthDp heightDp name group showBackground backgroundColor locale
  4. @Gio_Sastre ANDROID @Preview @Preview @Preview COMMON widthDp heightDp widthDp heightDp

    fontScale locale uiMode device wallpapers apiLevel @Preview systemUi showBackground backgroundColor name group name group fontScale locale device DESKTOP widthDp heightDp name group showBackground backgroundColor locale @Preview Composable Scanner
  5. @Gio_Sastre ANDROID @Preview @Preview @Preview COMMON widthDp heightDp widthDp heightDp

    fontScale locale uiMode device wallpapers apiLevel @Preview systemUi showBackground backgroundColor name group name group fontScale locale device DESKTOP widthDp heightDp name group showBackground backgroundColor locale @Preview Android ComposablePreviewScanner Glance ComposablePreviewScanner Common ComposablePreviewScanner JvmAnnotation Scanner In Evaluation ? ? Composable Scanner
  6. Linkedin @SergioSastre sergio-sastre @Gio_Sastre Hashnode blogs Sergio Sastre Flórez GDE

    for Android Lead Android developer Github sergio-sastre-florez

More Decks by Sergio Sastre Flórez

Other Decks in Programming