A report is currently running on code coverage of functional Unit Test cases.
- Updated to the latest version of Android Studio (1.2.1)
- Updated Android plugin in Android Studio (1.2.3)
- Updated Gradle Version (2.2.1)
- Unit Test Build Option Changed
Now I can get the Code Coverage report (using the default IntelliJ Idea Code coverage tool) of the unit tests that I wrote, extending the TestCase class. But when I write a class extending AndroidInstrumentatioTestCase2 or ActivityTestCase , I get t null when calling getActivity() . And when I switch the build options to the tools, the Run button with code is disabled.
So, in simple words, I want to know how to get a Code Coverage report in test cases that are both functional Unit Test cases and Instrumentation test cases.
PS: You can also use any other plugin to cover the code (for example, JaCoCo).
android android-studio unit-testing code-coverage
Anas azeem
source share