Search code examples
androidjenkinsjacocospoontest-coverage

JaCoCo Debug Coverage Test Report


I have a problem when test android to create coverage test report. I use ./gradlew createDebugCoverageReport command to create coverage report. Report is created but result of all tests are %0. First device is rooted but second device isn't. We use these two devices to test with spoon and look spoon output. So these two devices use together. Problem: When we run this command with first device(rooted device) all coverage tests result is created as expected but when we run tests with two devices together all coverage results are %0. How can I solve this problem.

Thanks


Solution

  • The JaCoCo works only on rooted devices or emulator.

    See reference here How do I get a jacoco coverage report using Android gradle plugin 0.10.0 or higher?

    Tip : Since you can only get a coverage report with the emulator and device with root permission