kotlin-android-template
kotlin-android-template copied to clipboard
Setup test coverage with jacoco/codecov
⚠️ Is your feature request related to a problem? Please describe
Add support for code coverage
💡 Describe the solution you'd like
Ideally we could setup jacoco + codecov to have an automated test report after every push/pr.
🤚 Do you want to develop this feature yourself?
- [ ] Yes
- [x] No
This feature is up for grab
I did something like this just a while back. I used the this plugin to generate Jacoco reports. This would be a small change. I did it in my own repo here. Let me know if you want me to work on this.
I did something like this just a while back. I used the this plugin to generate Jacoco reports. This would be a small change. I did it in my own repo here. Let me know if you want me to work on this.
Hey @nikhil-thakkar
Thanks for the suggestion. Ideally this should be doable by just using the jacoco Gradle plugin without other third party Gradle plugin.
Are you able to generate code coverage with Git Actions? @cortinico @matthewcmckenna
Not yet, this issue is up for grab 👍
I'm using https://github.com/vanniktech/gradle-android-junit-jacoco-plugin instead of https://github.com/autonomousapps/jacoco-android-gradle-plugin bcz the latter seems not updated.
@cortinico
- Does
jacocofor test files tell only about the lines covered or just the test status(passing/failing/ignored)? - How does Android Studio's test coverage is different then
Jacoco
Tried adding jacoco in one of the projects I am working on.

Android Studio Test Coverage

@cortinico
- Does
jacocofor test files tell only about the lines covered or just the test status(passing/failing/ignored)?- How does Android Studio's test coverage is different then
Jacoco
How is this related to this issue? You should probably ask on StackOverflow, Twitter or on Jacoco's issue tracker.
I put this intentionally here just to understand the requirement of the issue. Are we looking for a line to line code coverage here or just code coverage for test files for test results?
Are we looking for a line to line code coverage here or just code coverage for test files for test results?
The best would be to have a coverage report for the library- modules that consumer can integrated with their own tool (say codecov or others).