joshzhu - 2014-05-26

Hi there,

I am new to emma and my team want to use emma to collect coverage data when running the android app(run app manually on device instead of using ant task)

Really appreciated if there is reply ASAP.

ADT version: v22.6.2-1085508
App minSDKVersion: 8, targetSdkVersion:19
ANT version:1.9.4

Steps I have done(I have tried steps in either emulator and rooted device, no luck):
1. Create instrumented apk using "ant instrument" command
2. Install apk to the emulator using adb install command
3. set system property"Coverage.file.out" using adb shell setprop Coverage.file.out /data/local/tmp/coverage.ec
4.Run the app on emulator, do some operations
5. I can see log message "EMMA: collecting runtime coverage data ..." get logged on logcat after starting app(I think this means all above steps executed correctly and environment is ok for emma to run, correct me if I miss something and there are more things need to check?)

My issue:
I can't see coverage.ec file generated in tmp folder. I checked logcat, no message like "EMMA: runtime coverage data merged into..." logged so that I think dumpCoverageData is not triggered.

I also stopped the app from DDMS, no log "EMMA: runtime coverage data merged into..." generated as well as the coverage.ec file.

My question:
1. What is the condition that trigger coverage data dump? Is it JVM exiting that the app runs on ? if yes, how to achieve it manually from commandline or from device?
2. Point me out if I missed anything in above steps or what else I can check.
3. I downloaded the emma source and want to dive into it further.How can I open it as an eclipse project so that I can see the code and find declariation/references more easily.

Thank you!

 

Last edit: joshzhu 2014-05-26