使用adt - JUnit测试不运行带有EclEmma测试、adt、JUnit、EclEmma

2023-09-14 00:03:48 作者:活着活着就死了

我目前运行Eclipse朱诺的Andr​​oid开发工具插件,这样我就可以开发Android应用程序并对其进行测试。为了获得code中的应用范围(和$ P $的Andr​​oid本身pferably这些API),我安装EclEmma到Eclipse中,但就在我正要运行它的第一次,它给了我一个错误:

I am currently running Eclipse Juno with the Android Development Tools plugin so I can develop Android applications and test them. To get code coverage of the applications (and preferably the APIs of Android themselves), I installed EclEmma into Eclipse, but just when I was about to run it for the first time, it gives me an error:

Error while dumping coverage data (code 5013).
Socket closed

我不知道什么可能导致这一点,当我看着它的此处,解决方法似乎没有工作或我只是不知道它提到的那些目录时,使用Android SDK处理。任何人处理类似的问题?

I don't know what might be causing this, and when I looked it up here, the workaround didn't seem to work or I'm just not sure where those directories it mentioned are when dealing with the Android SDK. Anyone deal with similar problems?

推荐答案

最新版本的 EclEmma 使用的 Jacoco ,其中,据我了解不支持离线仪器。 你应该尝试找到一个pre-Jacoco版的 EclEmma (这是工作在一年前,的 http://dtmilano.blogspot.ca/2011/07/eclipse-android-and-emma-$c$c- coverage.html ),并尝试在朱诺(不太可能的工作进行安装),或粘到HTML报告,至极可以在Eclipse被打开,所以它没有这么大的问题。

Latest versions of EclEmma use Jacoco, which as far as I know doesn't support off-line instrumentation. You should try to find a pre-Jacoco version of EclEmma (it was working just one year ago, http://dtmilano.blogspot.ca/2011/07/eclipse-android-and-emma-code-coverage.html) and try to install it on Juno (very unlikely to work) or stick to the HTML reports, wich can be opened in Eclipse, so it's no such a big problem.