Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emma code coverage for android JUnit test

How to run Eclemma code coverage tool for android Junit test, not for Junit test? Can any one please help.

enter image description here

like image 832
Justin k Avatar asked Nov 14 '22 07:11

Justin k


1 Answers

The easiest way would be to add ant build files to both projects (main and test) and then use the specific ant targets to generate the coverage report. Then you can import the coverage report to EclEmma.

To add the ant build you first need to disable Project -> Build Automatically in Eclipse to avoid conflicts.

These steps are described in http://dtmilano.blogspot.ca/2011/07/eclipse-android-and-emma-code-coverage.html.

like image 179
Diego Torres Milano Avatar answered Nov 16 '22 02:11

Diego Torres Milano