I am working on a new project for Android. Currently, I am using Android studio as IDE. I need to run Unit test and System (CI) test flows which can be run on both Local machine (JVM) and Emulator/Real Device for instrumentation.
Note that I am running all unit tests via command line.
For get the code coverage of the Emulator/Real Device I am using Jacoco. and running the following command: gradlew createDebugCoverageReport However, I can't find any way to run the Local machine unit test with coverage report from command line. The only way is to run it from the android studio by selecting "Run XXX with Code Coverage":
Can you please advise if it is possible to run local unit test from command line with coverage. And get the report as an html file?
Thanks, Zachi
The report can be generated using the android studio, after you run the test with coverage the results window appears, click the button bordered with red
Check this image:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With