艾玛失败了,如何调试在模拟器上运行的android测试用例?
我试图通过在我的 mavenized android 项目上运行 ant emma 来获取覆盖率报告,其他一切都很顺利,但是当运行
ant emma debug install test.
输出时我遇到了 NullPointerException:
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发生在哪里。
I am trying to get coverage report by running ant emma on my mavenized android project, everything else went smoothly, but i bumped into NullPointerException when running
ant emma debug install test.
output is:
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
How can I debug this ? I would like to find out where the NPE happened.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论