~/talk

Overview of UI testing in Compose

Talkat droidcon New York 2022 · 2022-09-01..09-02· [android, testing]
links:none on file
slides:none on file

Shows how to test Jetpack Compose UIs end-to-end using the ui-test-junit4 and the debug-only ui-test-manifest AAR, creating a ComposeTestRule (or AndroidComposeRule) and calling setContent or launching an activity. Explains the merged semantic tree vs unmerged semantics, inspecting with Layout Inspector and printToLog, writing a custom onNode matcher (joined text) to handle annotated string lists, controlling animations by pausing the main clock and advancing to 4s, and capturing bitmaps to SD card (total4.png).

AI-written summary · about

  1. 0:00Introduction to UI testing in Compose
  2. 0:53Types of Android tests overview
  3. 3:03Adding UI test dependencies
  4. 4:27Setting up Compose test rules
  5. 6:13Understanding semantic tree in Compose
  6. 10:28Inspecting UI with Layout Inspector
  7. 14:58Debugging semantic tree with logs
  8. 17:06Handling merged text semantics
  9. 19:40Writing custom node matchers
  10. 22:46Testing text assertions in Compose
  11. 25:13Testing animations in UI tests
  12. 27:42Capturing animation snapshots
  13. 30:09Idling resources in Compose tests
  14. 31:52Compose test cheat sheet overview
  15. 33:15Q&A and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.