~/talk

Leveraging Kotlin to write maintainable UI tests

Talkat Android Makers 2019 · on Wednesday, 2019-04-24· [testing, kotlin]
slides:none on file

Concrete claim: a Kotlin DSL yields readable, compiler-checked Espresso integration tests that are easy to change and less flaky. Implementation uses Kotlin DSL with @DslMarker, extension functions, delegates and scoped receivers, espresso helpers and a three-layer UI test / DSL / helpers architecture. Determinism comes from an on-device OkHttp MockWebServer driven by Hamcrest matchers. Examples and a working repository are published and the DSL proves practical for RecyclerView item assertions and focused code completion.

AI-written summary · about

  1. 0:00Intro
  2. 0:49Goals
  3. 1:57Example system under test
  4. 3:11Simple function
  5. 3:46Implicit receiver
  6. 4:31Higher-order function with receiver
  7. 5:16Motivation
  8. 6:06Gwen structured code
  9. 6:39Gwen: implementation
  10. 9:31Summary. Easy to read
  11. 10:53Gwen: scoped collaborators
  12. 11:50Actions: scoped groups
  13. 13:38Actions: scoped by screen
  14. 16:12DSL scoping: Collaborators
  15. 18:54Layered separation: example action
  16. 19:41Layered separation, example setup
  17. 21:01Scoped layout: syntactic sugar
  18. 22:19Scoped layout: delegate
  19. 23:44Scoped layout: structure
  20. 25:00Summary. Easy to change
  21. 29:58User Collaborator
  22. 35:12Scoped layout: implementation
~/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.