2023-02-04 - FOSDEM 2023 - Brussels
Note: This is a shortened version of How to Test Your Compose UI.
Abstract
While Compose is easy to adopt, not creating legacy code right at the start of such a journey requires extra planning, awareness, and, most importantly, testing. We’ll have a look at how we can test pure Compose UIs as well as hybrid ones that have Views and composables too.
In this talk, we’ll learn what the semantics tree is, its relation to the composition, how we can manipulate it in composables using the Semantics modifier, how we can implement composables with testability in mind, and how we can test pure Compose, and hybrid UIs.
Check out the slides
Watch this talk
Resources
-
The demo project
https://github.com/stewemetal/composehydrationtracker
-
Jetpack Compose testing docs
https://developer.android.com/jetpack/compose/testing
-
Jetpack Compose testing cheatsheet
https://developer.android.com/jetpack/compose/testing-cheatsheet
-
Jetpack Compose accessibility docs
https://developer.android.com/jetpack/compose/accessibility
-
Jetpack Compose: Testing
https://youtu.be/kdwofTaEHrs
-
ADB podcast EP 171 - Compose Testing
https://adbackstage.libsyn.com/episode-171-compose-testing
-
Jetpack Compose sample projects
https://github.com/android/compose-samples