androidtestingcode-coveragecoberturaemma

What are my alternatives for test code coverage on Android?


I know Android's Ant tooling comes with built-in Emma code coverage, but Emma's reports look more and more dated and cannot be easily integrated into other coverage reports or even Sonar, basically because Emma lacks a detailed XML reporting format. What I want to achieve is

Do I have any alternatives?

edit: This post on sonar-devel probably sums up the current state of Android code coverage support as well as Sonar support pretty much. sigh


Solution

  • I have pushed a github repo that contains the same configuration as you mentionned in your question :

    and their inclusion in sonar. Only one at a time, but still the configuration is an interesting base to work on.

    https://github.com/stephanenicolas/Quality-Tools-for-Android

    A colleague and I have in mind to work on this issue with a very similar mindset as you do. We want to get better integration of different testing technologies to be available for Android projects and reporting to work in sonar as well.

    If you want to join our effort, we would be happy to give you the rights to the repo and start working with you.

    Stéphane

    -- Update

    Since march 2013, we also propose a unified configuration to use Jacoco offline instrumentation for both robolectric and standard junit tests and get results displayed simultanously in Sonar.