~/talk

The state of code coverage for Kotlin

Talkat droidcon Berlin 2024 · 2024-07-03..07-05· [kotlin, testing]
slides:none on file

Compares actual tools and failures: JaCoCo and JetBrains Coverage generally work but mis-map compiler-generated bytecode (try-with-resources, Kotlin inline functions, when-on-strings), causing lost branches; porting Sonar Kotlin from Java drops measured coverage from 95% to ~85–90%. Mutation testing (PITest/Mutation testing) finds missing assertions (string-hash collisions) but is slow (initial runs can be ~1h20m). Notes fixes: JaCoCo snapshot fixes composables; commercial arc mutate addresses Kotlin switch/hash issues; R8/bytecode instrumentation can break Android execution.

AI-written summary · about

  1. 0:00Introduction
  2. 1:56Support for Ukraine
  3. 2:17What is code coverage
  4. 4:03History of Kotlin coverage
  5. 6:55Key Kotlin coverage tools
  6. 9:49Coverage vs language features
  7. 14:46Kotlin features break coverage
  8. 18:20Inline functions challenges
  9. 23:38Coroutines testing coverage
  10. 25:24Android Compose coverage issues
  11. 27:10K2 compiler coverage testing
  12. 28:59Observer effect in coverage
  13. 31:55Coverage measurement workarounds
  14. 32:57Performance impact of tools
  15. 35:05Summary and improvements
  16. 37:10Closing remarks & Q&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.