Emma失败了,如何调试在模拟器上运行的android测试用例?

时间:2012-02-22 04:50:34

标签: android emulation integration-testing emma

我试图通过在我的mavenized android项目上运行ant emma来获取覆盖率报告,其他一切进展顺利,但我在运行时碰到了NullPointerException

ant emma debug install test. 

输出是:

test:
 [echo] WARNING: Code Coverage is currently only supported on the emulator and rooted devices.
 [echo] Running tests ...
 [exec] 
 [exec] com.jayway.maven.plugins.android.generation2.samples.libraryprojects.mainapp.MainActivityTest:INSTRUMENTATION_RESULT: shortMsg=java.lang.NullPointerException
 [exec] INSTRUMENTATION_RESULT: longMsg=java.lang.NullPointerException: Unable to start activity ComponentInfo{com.jayway.maven.plugins.android.generation2.samples.libraryprojects.mainapp/com.jayway.maven.plugins.android.generation2.samples.libraryprojects.mainapp.MainActivity}: java.lang.NullPointerException
 [exec] INSTRUMENTATION_CODE: 0
 [echo] Downloading coverage file into project directory...
 [exec] remote object '/data/data/com.jayway.maven.plugins.android.generation2.samples.libraryprojects.mainapp/coverage.ec' does not exist

我该如何调试?我想知道NPE发生在哪里。

0 个答案:

没有答案