Hi! Has anyone experienced a bug with JaCoCo repor...
# android
a
Hi! Has anyone experienced a bug with JaCoCo reporting 0% coverage on multi module Android projects? Details in thread
Basically, I'm having issues with code coverage on my app after adding a new module I have an kotlin android app using AGP 7.4.2, and it generates code coverage reports using JaCoCo, combining the coverage of both unit tests and instrumentation (emulator) tests Both test sets used to have a shared source folder, which contained builders and similar utility functions, but since newer Gradle/AS versions deprecated that, I moved the utility code to a new module :sharedtest (before that, only the module :app existed) The problem is that now the JaCoCo reports only contain coverage for the unit tests. I checked and the instrumentation tests are still running and generating an .ec coverage file, with around 100kB. I renamed the file to .exec, so I could analyze the coverage using Android Studio, but it still showed 0 coverage there Does anyone have any idea on how to solve or what might cause this?
y
If you are using coverage report feature which is AGP builtin, it has an issue that it cannot retrive kotlin coverage. https://issuetracker.google.com/issues/261275921
m
We are using
kover
in our multi module project without issues. As far as i know Jococo can not measure the coverage within coroutines. https://github.com/Kotlin/kotlinx-kover
586 Views