~/talk

TDD in Android with Spek

Talkat droidcon APAC 2020 · 2020-12-14..12-15· [testing]
links:none on file
slides:none on file

Shows how to set up Spek DSL on Android (requires JUnit 5 and a dev Maven for Spek 2.1.0), then practices TDD by writing unit tests first for an ArticleRepository interface with getArticles and fetchAndSync methods. Uses RX Java and fake data stores (success, empty, error, save) to assert behaviours: local emits first, remote merges later, empty local is ignored, and a custom empty result set exception signals total failure. Tests fail, implementation is added, and tests pass; warns Spek 2.1.0 is flaky on Android.

AI-written summary · about

  1. 0:00Introduction and speaker
  2. 1:14Why Spek for testing
  3. 2:17Setting up Spek framework
  4. 3:41Writing tests with Spek
  5. 5:27Test types and pyramid
  6. 8:19TDD workflow explained
  7. 9:44Interface design for TDD
  8. 11:49Blank implementation
  9. 12:30Preparing test fakes
  10. 14:36Testing fetch and sync
  11. 18:11Testing get articles
  12. 21:02Running and failing tests
  13. 21:22Implementing repository
  14. 23:50Reviewing TDD steps
  15. 26:00Resources and contact
~/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.