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