Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kover support for Android Gradle Plugin #96

Open
shanshin opened this issue Dec 14, 2021 · 13 comments
Open

Add Kover support for Android Gradle Plugin #96

shanshin opened this issue Dec 14, 2021 · 13 comments

Comments

@shanshin
Copy link
Collaborator

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
@Vaibhav-Personall
Copy link

Are we doing any development around this issue?

@shanshin shanshin added this to the Release 1.0.0 milestone Apr 8, 2022
@shanshin
Copy link
Collaborator Author

shanshin commented Apr 8, 2022

@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.

@jtomlinson
Copy link

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

@shanshin
Copy link
Collaborator Author

@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.

@pajatopmr
Copy link

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?

@shanshin
Copy link
Collaborator Author

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

@shanshin shanshin modified the milestones: Release 1.0.0, Release 0.9.0 Oct 27, 2022
@shanshin shanshin added the S: untriaged Status: issue reported but unprocessed label Oct 27, 2022
@shanshin shanshin added S: postponed Status: work on the issue is not in the short term plans and removed S: untriaged Status: issue reported but unprocessed labels May 22, 2023
@shanshin shanshin removed the Feature Feature request issue type label Oct 11, 2023
@shanshin shanshin changed the title Add support for instrumented tests for Android devices Add support for Android Gradle Plugin Oct 11, 2023
@shanshin shanshin changed the title Add support for Android Gradle Plugin Add Kover support for Android Gradle Plugin Oct 11, 2023
@merlinstardust
Copy link

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?

@RobinFarmer
Copy link

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

@shanshin
Copy link
Collaborator Author

shanshin commented Jan 9, 2024

Yes, work is underway in this direction

@HESE-HenrikStrand
Copy link

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

@stefanoq21
Copy link

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

@johngray1965
Copy link

@shanshin I see this is for Milestone "Release 0.9.0", and I see there's a PR for "Release 0.9.0". Yet there's no update here?

@shanshin
Copy link
Collaborator Author

shanshin commented Dec 20, 2024

@johngray1965,
we have reviewed our plans for the development of coverage measurement in Kotlin, and decided to switch to using the JaCoCo agent #720.

This will allow us to integrate with Android Gradle Plugin without having to make changes to AGP itself.

However, after the release of the new version of JaCoCo, even using only AGP, you will get a coverage measurement of comparable to Kover accuracy, since it has added support for inline functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants