~/talk

Write Unit Tests with Spek

TalkinJapaneseat DroidKaigi 2019 · 2019-02-07..02-08· [testing]
links:none on file
slides:none on file

Spek 2.0 is presented as a readable, JUnit-alternative that enforces ordered execution and BDD-style structure so tests serve as design documentation. Examples show using Spek 2.0 with Mockito and AndroidX testing utilities to unit-test ViewModel LiveData (by replacing executors and using InstantTaskExecutor-like rules) and to test Room (using a custom SQLite JDBC or allowMainThreadQueries plus a swapped executor); the approach is demonstrated end-to-end on a real menu app.

AI-written summary · about

  1. 0:00Start
  2. 1:52What we'll talk about today
  3. 7:39Point 1: Readability
  4. 8:48Point 2: Readability
  5. 10:28Basic syntax
~/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.