Code coverage for Android (calabash-android BDD)

巧了我就是萌 提交于 2019-12-03 16:45:38

The problem is that maven-android-plugin uses version 2.1.5320 of emma, whereas the Android tools use version 2.0.5312. As discussed here, those two versions are incompatible.

The fix is to only use a single version across the two tools. I've been able to get it to work by cloning the maven-android-plugin repo, setting the emma dependency version back to 2.0.5312, and installing it to my local repository. Make sure the emma dependency in your under-test project is also correct, and then you should be able to generate a coverage.

The alternative is to make sure all of the tools are using the newest version. I haven't tested it, but it might work if you do the report generation from maven is the version will be the same then. You could also download the newest version of emma and generate the report using the jar from that package.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!