12/20/2018, 6:09 PM
Anyone know of a way to get a coverage report of code execution without doing a normal instrumentation test? I want to run and exercise my app normally. Then exit and see a coverage report of the exercise in Android Studio. This would help immensely when refactoring old code to smoke test nothing was broken.
:stackoverflow: 1


12/20/2018, 9:20 PM
If I had to solve this problem I would be inclined to create an espresso test suite that would mimic the “normal” app manual exercise. Then you would have the coverage data for those tests and Gradle/Jacoco would give you a report. Not a perfect solution but perhaps a workable one.
btw, using the Android Studio “test with coverage” feature might be better than Gradle/Jacoco since Jacoco and Kotlin are not best of friends yet.