Using : JaCoCo 0.5.3, Maven2, Sonar 2.14, sonar-maven-plugin 1.8, SùartGWT 3.0
Currently trying to : Get code coverage on Sonar of my Selenium unit tests.
Problem : Code coverage doesn't move from 0% although the sensor is launched properly, analyse the jacoco.exec which is correctly generated.
Ressources : https://gist.github.com/2888912 The pom.xml
It's been about 2 weeks I'm trying to get code coverage. I upgraded the Sonar from 2.10 to 2.14, changed every single sonar property, tried the plugin jacoco (for maven) and I still DON'T get any results. So if someone had the same problems and found the solution, could you please tell me how you amde it work ?
I'm quite sure my tests must generate at least 0.5% of code coverage. My Selenium tests are actually executed in SeleniumTestLoginEntry.java, does it have any incidence ? Must I call it TestLoginEntry.java ? (The tested class is LoginEntry.java) I'm using surefire to start the javaagent of JaCoCo (see the tag) and it actually GENERATES the jacoco.exec.
Please give me some help, I'm totally lost I have only one week left to make it work... :(
Thanks in advance.
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
to your pom. Delete java agent, jacoco section (only leave jacoco plugin version). Sonar will create own pom file, find it in${basedir}/target/sonar/sonar-pom.xml
– Andrzej Jozwik