For coverage acquisition in Android Studio, Jacoco is supported, so use it.
All you have to do is add one setting to gradle
buildTypes {
debug {
testCoverageEnabled true
}
}
Now you are ready!
It seems that the git command is used to get it after trying various things, it is troublesome, so I get it by another method.
Click "Gradle" in the upper right corner of Android Studio and it will be displayed like this. With the above settings, "createDebugCoverageReport" should be added, You can get coverage by double-clicking on it. (* Results of instrumented test) At this time, let's start the emulator.
Then you should have coverage in "/ app / build / outputs / reports /"! I will omit the view of coverage because it is annoying.
end
Recommended Posts