[android-developers] Re: Android Emma Code Coverage
Is creating another build of android created by following the steps specified in the below blog : http://duykham.blogspot.com/2009/09/how-to-get-emma-code-coverage-of.html is the solution for the 0% code coverage or is there any other solution? I don't think that this is the solution I think I am missing something while generating the code coverage. Please help me in this regard Thanks in Advance Raghava Reddy -- 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
[android-developers] Re: Android Emma Code Coverage
For the above project I am creating the project using the "android" tool and command "android create project" and "android create test- project" to create the projects. To make the build I am using ant and for coverage I am using command "ant coverage" to make the coverage report. Building is working fine but the coverage.ec has no coverage data in it resulting in 0% coverage. The complete logs of the build process are as follows: ### Buildfile: C:\AndroidWorkSpace3\CalculatorTest\build.xml [setup] Android SDK Tools Revision 6 [setup] Project Target: Android 2.1 [setup] API level: 7 [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions. [setup] Importing rules file: platforms\android-7\templates \android_test_rules.xml -set-coverage-classpath: -install-instrumented: [setup] Android SDK Tools Revision 6 [setup] Project Target: Android 2.1 [setup] API level: 7 [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions. [setup] Importing rules file: platforms\android-7\templates \android_rules.xml -dirs: [echo] Creating output directories if needed... [mkdir] Created dir: C:\AndroidWorkSpace3\CalculatorTest \instrumented [mkdir] Created dir: C:\AndroidWorkSpace3\CalculatorTest \instrumented\classes -resource-src: [echo] Generating R.java / Manifest.java from the resources... [exec] (skipping index file 'C:\AndroidWorkSpace3\Calculator \res\drawable-mdpi\Thumbs.db') -aidl: [echo] Compiling aidl files into Java classes... compile: [javac] C:\android\android-sdk-windows\platforms \android-7\templates\android_rules.xml:248: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 2 source files to C: \AndroidWorkSpace3\CalculatorTest\instrumented\classes -emma-instrument: [echo] Instrumenting classes from C: \AndroidWorkSpace3\CalculatorTest\instrumented/classes... -dex-instrumented: [echo] Converting compiled files and external libraries into C: \AndroidWorkSpace3\CalculatorTest\instrumented\classes.dex... [echo] -package-resources: [echo] Packaging resources [aaptexec] Creating full resource package... [null] (skipping index file 'C:\AndroidWorkSpace3\Calculator \res\drawable-mdpi\Thumbs.db') -package-with-emma: [apkbuilder] Creating Calculator-debug-unaligned.apk and signing it with a debug key... [apkbuilder] Using keystore: C:\Documents and Settings\Amit\.android \debug.keystore -debug-with-emma: [echo] Running zip align on final apk... -install-with-emma: [echo] Installing C:\AndroidWorkSpace3\CalculatorTest\instrumented \Calculator-debug.apk onto default emulator or device... [exec] pkg: /data/local/tmp/Calculator-debug.apk [exec] Success [exec] 624 KB/s (0 bytes in 169822.000s) -compile-tested-if-test: -dirs: [echo] Creating output directories if needed... -resource-src: [echo] Generating R.java / Manifest.java from the resources... [exec] (skipping index file 'C: \AndroidWorkSpace3\CalculatorTest\res\drawable-mdpi\Thumbs.db') -aidl: [echo] Compiling aidl files into Java classes... compile: [javac] C:\android\android-sdk-windows\platforms \android-7\templates\android_rules.xml:248: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 1 source file to C: \AndroidWorkSpace3\CalculatorTest\bin\classes -dex: [echo] Converting compiled files and external libraries into C: \AndroidWorkSpace3\CalculatorTest\bin\classes.dex... [echo] -package-resources: [echo] Packaging resources [aaptexec] Creating full resource package... [null] (skipping index file 'C: \AndroidWorkSpace3\CalculatorTest\res\drawable-mdpi\Thumbs.db') -package-debug-sign: [apkbuilder] Creating CalculatorTest-debug-unaligned.apk and signing it with a debug key... [apkbuilder] Using keystore: C:\Documents and Settings\Amit\.android \debug.keystore debug: [echo] Running zip align on final apk... [echo] Debug Package: C:\AndroidWorkSpace3\CalculatorTest\bin \CalculatorTest-debug.apk install: [echo] Installing C:\AndroidWorkSpace3\CalculatorTest\bin \CalculatorTest-debug.apk onto default emulator or device... [exec] pkg: /data/local/tmp/CalculatorTest-debug.apk [exec] Success [exec] 336 KB/s (0 bytes in 16173.000s) coverage: [echo] Running tests ... [exec] [exec] com.example.android.test.CalculatorTest:.Generated code coverage data to /data/data/com.example.android/files/coverage.ec [echo] Downloading coverage file into project directory... [exec] 0 KB/s (0 bytes in 37.000s) [echo] Extracting coverage report... [report] no collected coverage data found in any of the data files [all reports will be empt
[android-developers] Re: Android Emma Code Coverage
to add to the above in the logs I could see that no coverage is generated. I am testing on emulator with 2.1 platform . The logs I have got are as follows: Extracting coverage report... [report] [EMMA v2.0, build 5312 (2005/06/12 19:32:43)] [report] input data path: [report] { [report] C:\AndroidWorkSpace3\CalculatorTest\coverage.ec [report] C:\AndroidWorkSpace3\CalculatorTest\coverage.em [report] } [report] source path: [report] { [report] C:\AndroidWorkSpace3\Calculator\src [report] } [report] processing input file [C:\AndroidWorkSpace3\CalculatorTest \coverage.ec] ... [report] loaded 0 coverage data entries [report] processing input file [C:\AndroidWorkSpace3\CalculatorTest \coverage.em] ... [report] loaded 9 metadata entries [report] 2 file(s) read and merged in 0 ms [report] no collected coverage data found in any of the data files [all reports will be empty] [report] merged metadata contains 9 entries [report] merged coverage data contains 0 entries [report] writing [html] report to [C: \AndroidWorkSpace3\CalculatorTest\coverage\coverage.html] ... [report] report: processing package [com.example.android] ... [echo] Saving the report file in C: \AndroidWorkSpace3\CalculatorTest/coverage/coverage.html Thanks in advance Raghava Reddy -- 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