I am developing apps using Android Studio.
I was able to run the test code.
But, I do not know how to get code coverage in android studio.
I have a
Enable testCoverage in your module build.gradle
file
buildTypes {
debug {
testCoverageEnabled true
}
}
and then
Right click on the test -> java package and select Run Tests in Java with Coverage
to run all tests with code coverage or right click on the particular test class and click Run SampleTest with Coverage