~/talk

Can You Read Your Tests? Clean and Useful Android Testing, with JUnit and Spock!

Talkat 360|AnDev 2016 · 2016-07-28..07-29· [testing, android]
name:Jon Reeve
links:none on file
slides:none on file

Shows concrete before-and-after tests: plain JUnit examples that silently pass or are brittle, then refactors using Hamcrest/AssertJ and finally Spock where data‑driven tests, expressive failure diffs, spying and stubbing are native. Demonstrates an assertion helper for Rx to eliminate TestSubscriber noise, shows how to split save and read tests to make failures meaningful, and argues for use fakes instead of nested mocks with a small fake that actually works. Expect runnable code snippets and clear tradeoffs rather than high‑level platitudes.

AI-written summary · about

  1. 0:00Clean unit testing intro
  2. 1:12Unreadable test code problems
  3. 3:01Split tests for clarity
  4. 4:52One thing per test
  5. 6:18Meaningless clean tests
  6. 7:45Simpler test names
  7. 8:31Complex test bodies restructured
  8. 9:57Naming for readability
  9. 10:38Noise in reactive tests
  10. 12:22Reusable assertion helpers
  11. 14:09Clear test fixtures
  12. 15:57Lost test context restored
  13. 17:47Concise test names
  14. 18:52Test code smells
  15. 21:41Test code care matters
  16. 22:44Break tests to fail
  17. 23:51Clear failure messages
  18. 24:13Spock testing intro
  19. 26:23Spock’s DSL benefits
  20. 27:48Spock advanced features
  21. 29:56Spock mocking
  22. 31:22Spock data-driven tests
  23. 33:30Spock expressive testing
  24. 34:15Q&A Spock Espresso
~/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.