Method coverage in an android application without

2019-05-07 00:02发布

问题:

Can someone give me an ide about method coverage in android apks without having the source code? I heard that there is an android specific version of emma project that can give method coverage information through instrumentation. But if I do not have the source code how can I instrument th code?

My goal is to some how get a report on which methods were called in the runtime while running the application.

回答1:

You don't need emma to get a report of which methods are called. Just:

  1. start DDMS
  2. selected the device
  3. select the process
  4. press "Start method profiling" button (arrows with red button)
  5. "Stop method profiling"

and you'll get a report like this one:

See the details at http://developer.android.com/tools/debugging/debugging-tracing.html