What is the current state of `Kotlin` + `Jacoco`?...
# android
i
What is the current state of
Kotlin
+
Jacoco
? Can I use
Jacoco
to get
JUnit
test coverage of Kotlin code? Does some one uses is on day to day basics? How mature is it currently with Kotlin?
w
You can use it, but the reports aren’t very accurate, from my observations — IJ’s coverage is vastly different from Jacoco’s
Things seem to be improving with new Jacoco versions, though
i
This would explain why I haven’t seen many articles on this subject. Do more people agree with this ?
w
Just to be clear, not very accurate doesn’t mean the metric is worthless — I’m using Jacoco and don’t plan turning it off. But I wouldn’t e.g. set coverage targets
As for articles — it may be due to the fact that there’s nothing different in configuring Jacoco with Java vs Kotlin 🙂
👍 2
i
I use it and the only problem I had so far is that Jacoco can't detect code coverage of inline functions.
👍 1
c
Supposedly, this is fixed in AGP 3.4, but we are currently on 3.2.1 and bumping requires herculean effort.