kotlinx-kover icon indicating copy to clipboard operation
kotlinx-kover copied to clipboard

Add Kover support for Android Gradle Plugin

Open shanshin opened this issue 4 years ago • 15 comments

The current implementation of the IntelliJ Coverage Agent allows you to run only Java tests running on the same machine where the Gradle build is running.

To implement coverage measurement on an Android device, it is necessary:

  • study how JaCoCo instruments the application on a physical or virtual Android device, how it transmits measurement results
  • learn how the Android Gradle Plugin applies JaCoCo to an Android application
  • refine the IntelliJ Coverage Agent to run on an Android device and transfer data from it
  • implement the correct instrumentation of the Android application in the Kover Gradle plugin

shanshin avatar Dec 14 '21 10:12 shanshin

Are we doing any development around this issue?

Vaibhav-Personall avatar Mar 08 '22 14:03 Vaibhav-Personall

@Vaibhav1412, unfortunately, at the moment we have not yet started implementing test instrumentation on Android devices.

After assessing the complexity of the implementation of such functionality, we will be able to more accurately announce the terms.

shanshin avatar Apr 08 '22 09:04 shanshin

Any updates on how this might be progressing in development or somewhat of an ETA on when we might see this working?

jtomlinson avatar Jun 14 '22 15:06 jtomlinson

@jtomlinson, this issue is in the plans, but at the moment we are focused on making the API more convenient and adding support for filtering by flavors/build types. After improving the API, we will start exploring ways to instrument Android devices.

shanshin avatar Jun 14 '22 23:06 shanshin

As I write this comment, my take on the status of using Kover for Android instrumentation tests is that it is not yet ready but that Jacoco is still usable to some degree. Is that a correct take?

pajatopmr avatar Aug 12 '22 15:08 pajatopmr

@pajatopmr, yes, at the moment, it is preferable to use JaCoCo for instrumentation tests.

shanshin avatar Aug 23 '22 18:08 shanshin

Any updates as to when Kover will support Android Instrumentation tests?

If not, how can I pull in the coverage data from JaCoCo and combine it with Kover's so I can get a full report?

merlinstardust avatar Nov 30 '23 23:11 merlinstardust

Over a year since the last comment I was wondering if there have been any efforts been put into this issue?

RobinFarmer avatar Jan 09 '24 07:01 RobinFarmer

Yes, work is underway in this direction

shanshin avatar Jan 09 '24 18:01 shanshin

Yes, work is underway in this direction

Thanks for working on this issue! Do you have an estimated timeframe for when it might be fixed? @shanshin

HESE-HenrikStrand avatar Jul 09 '24 14:07 HESE-HenrikStrand

Hi @shanshin, do you have any news on that?

stefanoq21 avatar Sep 28 '24 16:09 stefanoq21