~/talk

Code coverage MythBusters

Talkat jPrime 2024 · 2024-05-28..05-29· [testing, developer-experience]
slides:none on file

Claim: aiming for 100% coverage isn't required — examples show JaCoCo, IntelliJ and SonarQube report different line/branch/instruction counts; mutation testing (PIT) finds surviving mutants even when line coverage is 100%. Tools actually used: JaCoCo, JUnit 4/5 (Vintage), Mockito, SonarQube, IntelliJ, Eclipse, JMH benchmark, PIT; surprising findings: zero coverage can reveal a wrong test engine, mocks can hide execution, compiler/JDK versions change branch counts, instrumentation slows tests and can break synchronization on some bytecode. Recommendation: treat coverage as a developer metric and use coverage to debug, not to appease managers.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:54Code coverage MythBusters concept
  3. 3:23Myth: 100% coverage is mandatory
  4. 5:57Debugging with zero coverage
  5. 7:00Coverage for debugging Eclipse
  6. 9:29Mocking and coverage limitations
  7. 12:40Coverage with Mockito issues
  8. 14:30Switch expressions and coverage
  9. 16:56Testing geometric shapes
  10. 18:18Coverage differences by JDK version
  11. 20:27Alternative coverage tools
  12. 21:52SonarQube coverage comparison
  13. 23:39Line vs instruction vs branch coverage
  14. 25:46Mutation testing with PIT
  15. 28:39100% coverage doesn't guarantee quality
  16. 29:46SonarQube project coverage issues
  17. 31:30Coverage for managers vs developers
  18. 32:11Observer effect on coverage measurement
  19. 34:18Performance impact of coverage tools
  20. 36:08Coverage affecting synchronization
  21. 38:44Summary and key takeaways
  22. 42:40Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.