Is there a way to run unit tests for Android from Eclipse in a way that will instrument the code and measure test code coverage?
I\'m looking for a simple way to fi
Install EclEmma from Eclipse Marketplace.
If you have file rename it.
I was able to generate test coverage report by executing following from the console:
+ Enter,
cd + Enter,
ant emma debug install test + Enter,
where is /opt/android-sdk-linux/tools/ on my machine - the folder where android SDK is installed.
This generated file.
If you get "wrong JAVA_HOME" error execute gksu gedit /etc/environment + Enter, correct JAVA_HOME, save the file, log out or reboot and try again.
Source: http://blog.rabidgremlin.com/2010/11/19/android-tips-generating-a-coverage-report-for-your-unit-tests/