0

I'm working on a web application using Grails 2.1.1 and it was requested me to make evidence about the test code coverage.

The project is using:

  • Maven 3.0.5
  • code-coverage 1.2.7 (grails plugin for Cobertura)
  • sonar-maven-plugin 2.5
  • SonarQube 3.7.4 (running on localhost)

On my pom.xml, there are declared the following sonar's properties:

<sonar.language>grvy</sonar.language>        
<sonar.groovy.cobertura.reportPath>target/test-reports/cobertura/coverage.xml</sonar.groovy.cobertura.reportPath>

I successfully generate cobertura.xml report inside directory target/test-reports/cobertura, launching the command:

grails tA -coverage -xml

but when I run:

mvn sonar:sonar

It isn't displayed any test report on Sonar, although I receive as command response the following output lines:

[INFO] [15:20:42.007] Sensor Groovy CoberturaSensor...
[INFO] [15:20:42.007] Analyzing Cobertura report: target/test-reports/cobertura/coverage.xml
[INFO] [15:20:42.086] Sensor Groovy CoberturaSensor done: 79 ms
mirkochip
  • 11
  • 3
  • Give a try to this useful article http://causecode.com/ng/dist/index.html#/blog/show/19 – Shashank Agrawal Apr 09 '15 at 18:45
  • Thanks a lot, anyway I solved through http://stackoverflow.com/questions/25901059/sonarqube-4-4-not-displaying-cobertura-unit-tests-or-code-coverage-for-grails-2/25901837#25901837 – mirkochip Apr 10 '15 at 09:49

0 Answers0