~/talk

Best Practices for Unit Testing in Kotlin

Talkat KotlinConf 2018 · 2018-10-03..10-05· [testing, kotlin]
links:none on file
slides:none on file

Shows how to write idiomatic unit tests in Kotlin by using Kotlin data classes for test fixtures to get concise, readable failures, preferring constructor injection and small interfaces to avoid brittle static-heavy code, and avoiding starting the Spring context in unit tests (reserve Spring test annotations for integration tests) to speed setup and reduce resource use. Recommends using expressive assertion libraries and careful mocking to keep tests fast and easy to diagnose.

AI-written summary · about

  1. 0:00Unit testing in Kotlin
  2. 3:10Unit test basics
  3. 8:12Test design principles
  4. 13:53Interfaces and testability
  5. 19:25Spring test setup
  6. 24:13Property-based tests
  7. 28:09Test data and use cases
  8. 31:54Practical test cases
  9. 35:06Summary
~/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.