I have an android library project. We are using Robolectric to run the unit tests. Unit Tests are working fine from the IDE as well as Ant build.xml file. I am able to get the code coverage using the eclEmma plugin in Eclipse. But I am facing problems while getting coverage report from ant build. Tried using Jacoco for coverage report generation but getting 0% code coverage in spite of the fact that all tests are passing and code coverage from the plugin is 85%. Could anybody suggest what would be right framework for getting code coverage for unit tests while I am using Robolectric for unit tests and ant for build purposes.
Asked
Active
Viewed 159 times
1
-
I think it is not a framework question but coverage configuration. We use jacoco code coverage throug gradle plugin – Eugen Martynov May 29 '15 at 20:25
-
Thanks @EugenMartynov. I have updated the answer to this question – Prateek Jun 01 '15 at 09:20
1 Answers
1
This was a problem with configuration only. I changed the configuration and updated my build.xml . Now it works like a charm. I am able to get code coverage easily through Jacoco

Prateek
- 139
- 1
- 11