Android instrumented tests code coverage report that includes all app modules

540 views Asked by At

I have an Android project with multiple library modules. At the application module I have some instrumentation tests that test the main functionalities of the app and I want to record the code coverage when running those tests.

When running the gradle task "createDebugCoverageReport", the coverage report is generated (coverage.ec files and html report), but it shows that only classes in the application module are covered, even the classes from the library modules have also been used.

I've also tried to record the test coverage using Spoon with the spoon-gradle-plugin. In that case, the coverage report covered again only the classes in the application module.

Is there any way to obtain the code coverage of all the library modules when running the instrumented tests?

I already added the following in each module:

debug {
  testCoverageEnabled true
}
0

There are 0 answers