3
votes

We measure the code coverage in a gwt project with emma, as described here: http://www.gwtproject.org/doc/latest/DevGuideTestingCoverage.html

This works and I get the html report, the emma.em and the emma.ec file.

On sonar I have only jacoco as coverage recording, which doesn't work for gwt unit tests. But there is the possibility to import jacoco.exec files: sonar.jacoco.reportPath

How can I convert now the emma.em and/or the emma.ec file to the jacoco.exec format? Or is it possible to generate jacoco.exec files directly from emma?

2
Did you ever find the solution to this problem? We have the same issue, only with Android, Ant and Jenkins builds. - Rogier van het Schip

2 Answers

0
votes

It is possible to get coverage report with Sonar Emma plugin. Please follow below link. http://docs.codehaus.org/display/SONAR/Emma+Plugin

0
votes

found a solution

apply plugin: 'war'
apply plugin: 'gwt'//https://github.com/steffenschaefer/gwt-gradle-plugin
apply plugin: "jacoco"
jacoco {
    toolVersion = "0.7.1.201405082137"

}
test{

    jacoco {

          includes= ["test.*"]//filter
          classDumpFile = file("$buildDir/classes/main")


    }

}