What currently working is the Code Coverage report of the functional Unit Test cases.
- Updated to the latest Android Studio (1.2.1)
- Updated the Android Plugin in Android Studio (1.2.3)
- Updated the Gradle Version (2.2.1)
- Changed the Build Variant to Unit Test
Now I am able to get the Code Coverage report (using default IntelliJ Idea Code coverage tool) of the unit tests I wrote extending TestCase
class. But when I write a class extending AndroidInstrumentatioTestCase2
or ActivityTestCase
, I am gettting a null
when I call getActivity()
. And When I switch the Build Variants to Instrumentation, the Run with Code Coverage button is disabled.
So, in simple words, I want to know is how to get Code Coverage report in the test cases which are both functional unit test cases as well as Instrumentation test cases.
PS: Any other code coverage plugin (like JaCoCo) can also be used.