Google I/O 2023のセッション「Scalable UI testing solutions」の内容をまとめたスライドです https://www.youtube.com/watch?v=L6CSaH0kDnI
Scalable UI testing solutionsGoogle I/O2023LT
View Slide
SummaryEspresso Device APIFirebase Test Lab with Gradle Managed DevicesCompose Screenshot Test2https://www.youtube.com/watch?v=L6CSaH0kDnI
Espresso Device API3
Foldable device4
Configuration ChangeConfiguration ChangeAndroid Emulator33.1.10 Android Gradle Plugin8.2.0-alpha04 https://developer.android.com/studio/preview/features#espresso-device-apiandroidx.test.espresso:espresso-device5
6
Firebase Test Lab with Gradle Managed Devices7
8Gradle Managed DevicesGradle AndroidTest AVD/CIAGP8.2.0-alpha01 Firebase Test Lab
9Firebase
10$ gcloud auth login$ gcloud config set project PROJECT_ID$ ./gradlew assembleDebugAndroidTest$ gcloud firebase test android run \--type instrumentation \--app app-debug-unaligned.apk \--test app-debug-test-unaligned.apk \--device model=Nexus6,version=21,locale=en,orientation=portrait \--device model=Nexus7,version=19,locale=fr,orientation=landscape--client-details matrixLabel="Example matrix label"
Compose Screenshot Test11
Screenshot testUI12
13Preview@Preview@Composablefun CardPreview() {//…}
Host-side screenshot test@Preview ComposableAndroidTest Android Gradle Plugin8.2.014