~/talk

Testing in Kotlin: The Holy Grail of Readability and Power

Talkat Øredev 2023 · 2023-11-08..11-10· [kotlin]
slides:none on file

Kotlin proves DSLs make tests both more readable and more powerful: Kotest provides FeatureSpec/BehaviorSpec/FunSpec and a JUnit-compatible AnnotationSpec for gradual migration, built-in property-based testing generates inputs and reproduces failures with a seed (it finds the flat-discount > total bug in the shopping-cart demo), mocking via mockk produces concise behavioral mocks, and assertion libraries like Atrium give structured, human-readable failure reports. A UI DSL for IntelliJ tests and support for mutation testing complete the toolchain.

AI-written summary · about

  1. 0:00Introduction
  2. 2:07Readable tests in Kotlin
  3. 5:06Behavior-driven limits
  4. 7:14Kotest Behavior Spec
  5. 11:06Kotest DSL structure
  6. 15:03Live demo: Kotest Feature Spec
  7. 18:19Fix test duplication
  8. 21:10Kotlin data-driven tests
  9. 24:10Property-based testing
  10. 29:40Mocking with MockK
  11. 33:37Atrium assertions
  12. 36:08UI testing with Kotlin
  13. 37:11Kotest key takeaways
  14. 39:13Q&A
~/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.