oppia-android icon indicating copy to clipboard operation
oppia-android copied to clipboard

Set up code coverage for Robolectric tests

Open vinitamurthi opened this issue 4 years ago • 4 comments

We would like to get code coverage reports for our robolectric tests. The code coverage tool needs to be compatible with Kotlin and java, as well as work on Gradle and Bazel. Jacoco seems to be a good pathway, some useful links:

  • Jacoco for Kotlin: https://kevcodez.de/posts/2018-08-19-test-coverage-in-kotlin-with-jacoco/
  • Jacoco in Bazel: https://github.com/bazelbuild/bazel/tree/master/third_party/java/jacoco

vinitamurthi avatar Jul 22 '20 04:07 vinitamurthi

CC @BenHenning @anandwana001 , let me know your thoughts on using Jacoco! Here's the link: https://www.jacoco.org/jacoco/trunk/index.html

vinitamurthi avatar Jul 22 '20 04:07 vinitamurthi

FYI I found out that Bazel's android local tests do not support code coverage at all, and this is something we'll need to contribute directly.

BenHenning avatar Jan 23 '21 19:01 BenHenning

May I work on this?

MaskedCarrot avatar Feb 16 '21 14:02 MaskedCarrot

Thanks for showing interest to work on this task but it already assigned.

peculiaruc avatar Feb 16 '21 14:02 peculiaruc