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 now support code coverage through the ant build system. In addition there are a couple new commands in SDK tools version 3: 'android create test-project' and 'android update test-project' which will hopefully make creating test projects easier.
To make use of this, 1. If you already have an existing main project and test project; run 'android update project' and on both your existing and test project 2. Otherwise, run 'android create project' and 'android create test-project' to create new projects 3. Create an AVD for the Android 2.0 platform if you haven't already, and launch an emulator for this AVD 4. cd to the <path of your test-project> 5. Run 'ant coverage' This ant command should do all the necessary source code compilation, instrumentation, test execution, etc. If successfully, once the command is finished, you should see a line informing you where the html code coverage report has been generated. I hope this helps. Regards, Brett. On Wed, Sep 2, 2009 at 8:09 AM, Gabor <gabor.andr...@googlemail.com> wrote: > > Hi all, > > Here are the steps how to create an emma instrumented APK in SDK!!! > (emma.jar is required !!!) You don't need to use android source tree > anymore. > - compile the source code > - instrument the code with emma > - generate android byte code > - create APK > - sign it > > To run the test you have to create a new platform in the SDK (with > emma integrated), so do the following: > - from the source tree you have to create an emma integrated image. > (add emma.jar to init.rc and add the emma.jar path to the build/target/ > product/core.mk) > - copy the android-1.5 platform to android-1.5-emma and overwrite the > imagas in the images folder. > > Have fun! > > Gabor > > > --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---