Slide 1

Slide 1 text

BY SERGIO SASTRE + test

Slide 2

Slide 2 text

@Gio_Sastre Screen designs Content

Slide 3

Slide 3 text

@Gio_Sastre Screen designs Loading Content

Slide 4

Slide 4 text

@Gio_Sastre Screen designs Loading Error Content

Slide 5

Slide 5 text

@Gio_Sastre Screen designs Content

Slide 6

Slide 6 text

@Gio_Sastre Content

Slide 7

Slide 7 text

@Gio_Sastre Content @Preview

Slide 8

Slide 8 text

@Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview @Preview

Slide 9

Slide 9 text

@Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview AppTheme { } @Preview

Slide 10

Slide 10 text

@Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview AppTheme { } fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList , ) { } @Preview

Slide 11

Slide 11 text

@Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList , ) { } @Preview

Slide 12

Slide 12 text

@Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } Header ( … ) fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList , ) { } @Preview

Slide 13

Slide 13 text

@Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } Header ( … ) SubscriptionsLazyColumn ( items = subscriptions ) { … } fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList , ) { } @Preview

Slide 14

Slide 14 text

@Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } Header ( … ) SubscriptionsLazyColumn ( items = subscriptions ) { … } BuySubscriptionButton ( enabled = true ) fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList , ) { } @Preview

Slide 15

Slide 15 text

@Gio_Sastre @Preview Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } Header ( … ) SubscriptionsLazyColumn ( items = subscriptions ) { … } BuySubscriptionButton ( enabled = true ) fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList , ) { }

Slide 16

Slide 16 text

@Gio_Sastre @Preview Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { }

Slide 17

Slide 17 text

@Gio_Sastre @Preview ( fontScale = 1.3f ) @Preview Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { }

Slide 18

Slide 18 text

@Gio_Sastre @Preview ( fontScale = 1.3f ) S C R O L L A B L E @Preview Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { }

Slide 19

Slide 19 text

@Gio_Sastre

Slide 20

Slide 20 text

@Gio_Sastre

Slide 21

Slide 21 text

@Gio_Sastre

Slide 22

Slide 22 text

@Gio_Sastre

Slide 23

Slide 23 text

@Gio_Sastre Original New

Slide 24

Slide 24 text

@Gio_Sastre Original New Diff Verify

Slide 25

Slide 25 text

How does screenshot testing @Gio_Sastre work ?

Slide 26

Slide 26 text

record AND verify @Gio_Sastre

Slide 27

Slide 27 text

CI @Gio_Sastre @Composable JVM

Slide 28

Slide 28 text

CI @Gio_Sastre + @Preview @Composable JVM

Slide 29

Slide 29 text

CI @Gio_Sastre + @Preview @Composable = test JVM

Slide 30

Slide 30 text

CI @Gio_Sastre + @Preview @Composable JVM

Slide 31

Slide 31 text

CI @Gio_Sastre + @Preview @Composable record JVM

Slide 32

Slide 32 text

CI @Gio_Sastre + @Preview @Composable record JVM

Slide 33

Slide 33 text

CI @Gio_Sastre + @Preview @Composable JVM

Slide 34

Slide 34 text

CI @Gio_Sastre + @Preview @Composable refactoring JVM

Slide 35

Slide 35 text

CI @Gio_Sastre + @Preview @Composable refactoring verify JVM

Slide 36

Slide 36 text

CI @Gio_Sastre + @Preview @Composable refactoring verify JVM

Slide 37

Slide 37 text

CI @Gio_Sastre + @Preview @Composable refactoring verify JVM

Slide 38

Slide 38 text

CI @Gio_Sastre + @Preview @Composable refactoring verify JVM

Slide 39

Slide 39 text

CI @Gio_Sastre + @Preview @Composable refactoring verify JVM

Slide 40

Slide 40 text

@Gio_Sastre + @Preview @Composable JVM refactoring verify

Slide 41

Slide 41 text

@Gio_Sastre + @Preview @Composable JVM refactoring verify

Slide 42

Slide 42 text

@Gio_Sastre + @Preview @Composable JVM refactoring verify

Slide 43

Slide 43 text

@Gio_Sastre Fast Feedback Loops Don’t write screenshot tests Auto-generate them from @Previews

Slide 44

Slide 44 text

Roborazzi Paparazzi Compose Preview @Gio_Sastre Auto-generate tests from @Previews @Previews source location

Slide 45

Slide 45 text

Roborazzi Paparazzi Compose Preview @Gio_Sastre Auto-generate tests from @Previews @Previews source location Fully automated screenshotTest only

Slide 46

Slide 46 text

Roborazzi Paparazzi Compose Preview @Gio_Sastre Auto-generate tests from @Previews @Previews source location Fully automated screenshotTest only main Fully automated screenshotTest androidTest

Slide 47

Slide 47 text

Roborazzi Paparazzi Compose Preview @Gio_Sastre Auto-generate tests from @Previews @Previews source location Fully automated screenshotTest only + main screenshotTest androidTest main Fully automated screenshotTest androidTest

Slide 48

Slide 48 text

Composable Preview Scanner https://github.com/sergio-sastre/ComposablePreviewScanner @Gio_Sastre