~/talk

Code coverage MythBusters

Talkat JNation 2024 · 2024-06-04..06-05· [testing, developer-experience]
slides:none on file

Claims: JaCoCo and IDE/JetBrains engines report different coverage numbers; zero coverage revealed tests didn't run (JUnit 4 vs 5/Vintage). Tools can be fooled: Mockito and final methods, switch statements vs switch expressions, and bytecode differences across Java 21/23 affect reports. Mutation testing with PIT shows surviving mutants that line coverage misses—PIT mutation testing finds weak assertions. Coverage instrumentation slows runtime (JetBrains engine ~4x slower in this benchmark) and can break JVM monitor/JIT behavior, risking Android failures.

AI-written summary · about

  1. 0:00Introduction and speakers
  2. 2:08Supporting Ukraine
  3. 4:16Myth: 100% code coverage is mandatory
  4. 7:30Zero code coverage as a debugging tool
  5. 10:24Code coverage for debugging Eclipse plugins
  6. 11:05Demo: Best conference function
  7. 16:00Mocking pitfalls and switch expressions
  8. 20:02Demo: Perimeter calculation function
  9. 21:57Code coverage depends on compiler
  10. 23:01Comparing coverage tools: IntelliJ, JCoCo, Sonar
  11. 27:23Mutation testing with PIT
  12. 31:50Code coverage as a developer metric
  13. 34:01Code coverage performance impact
  14. 38:59Code coverage and JVM behavior
  15. 42:36Final myth: 100% coverage is achievable
  16. 44:17Key takeaways and summary
~/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.