[android-developers] Re: EMMA Code coverage and JUnit
Hi Brett
On Oct 27, 6:18 pm, Brett Chabot <brettcha...@android.com> wrote:
> Hi all:
>
> In case you missed its mention in the release notes, I just wanted to point
> out that version 3 of the Android SDK tools, and the Android 2.0 platform
> 5. Run 'ant coverage'
I'm trying this with 1.6r1 SDK updated with 2.0.1 platform & not
having any success. I have a main project at c:\Project and a test
project at c:\TestProject. The main project was created via Eclipse
ADT, but I've subsequently run "android update project" on it to get a
build.xml etc. The test project was originally created via ADT also
and updated with "android update test-project" but that didn't create
a build.xml, so I ran "android create test-project" too. This still
resulted in errors when running ANT targets (ANT claimed it couldn't
find the templates directory in the SDK/platforms folder, though it
did exist), so I ultimately created it from scratch using "android
create test-project" - all good, ANT targets now run.
Running "ant coverage" almost works - I see the various intermediate
targets execute fine. My main project gets built, instrumented,
zipped up etc. My tests get built & run, but then fail with:
coverage:
[echo] Running tests ...
[exec] INSTRUMENTATION_RESULT: shortMsg=Class ref in pre-verified
class res
olved to unexpected implementation
[exec] INSTRUMENTATION_RESULT:
longMsg=java.lang.IllegalAccessError: Class
ref in pre-verified class resolved to unexpected implementation
[exec] INSTRUMENTATION_CODE: 0
[echo] Downloading coverage file into project directory...
[exec] remote object '/data/data/com.rkdmobile.french.atout.eval/
files/cove
rage.ec' does not exist
Clearly the last line is a symptom of the earlier failures, but what
are the "unexpected implementation" errors?? I should point out that
"ant run-tests" succeeds. The project is using the guice-2.0-no_aop
and robo-guice libraries, though the (at present just sanity check)
tests don't make explicit references to any guice classes (the app
does though).
Does anyone have this working on a stock, downloaded SDK for a simple
Android app?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home