You need to add the following to your build.gradle:
apply plugin: 'jacoco'
jacoco {
toolVersion "0.7.5.201505241946"
}
Also in buildTypes:
debug {
testCoverageEnabled = true
Run
gradle tasks
and you will see a task named (if you use a debug build to cover)
createDebugCoverageReport
Run
gradle createDebugCoverageReport
In the next folder you will see cover.ec
$build_dir/outputs/code-coverage/connected/flavors/debug/coverage.ec
Which device are you using and which OS? Some device with a specific OS creates an empty coverage area. Com. Share additional information about the OS and the device you are using?
source
share