Code coverage for Android

Gheghen picture Gheghen · Jun 6, 2011 · Viewed 10.6k times · Source

Possible Duplicate:
Android test code coverage, Eclipse

Its really frustrating to see there is no documentation for how to use EMMA for Android apps in Eclipse. Has anyone managed to work with EMMA in eclipse for Android apps? Without checking out the whole android source and do all the hackery?

Answer

dongshengcn picture dongshengcn · Jul 10, 2011

This does not answer your question directly, but I would suggest you to take a look at writing test with Robolectric: http://pivotal.github.com/robolectric/

With Robolectric, you can write your testing running inside JVM instead of Delvik VM. That means you can use almost any code coverage tool for JAVA. You might have to change your code a bit so you can write your Robolectric, and also you have not start hacking Robolectric too. To me, it is just a better way to write test.