-javaagent:/foo/sonarqube/jacoco-0.7.8/lib/jacocoagent.jar=output=tcpserver,jmx=true"
[INFO] Sensor JaCoCoSensor [java]
[INFO] Analysing /home/travis/build/SonarSource/sonar-rule-api/target/jacoco.exec
I run unit tests via the maven plugin and get coverage in sonarqube, so I can get coverage %s.
sonar-runner.properties sets:
sonar.jacoco.itReportPath=target/jacoco-client.exec
# set location of code under test
sonar.sources=/project/src/main/java/com/akamai/cps
# set location of tests
sonar.tests=/project-regression/src/main/java/com/akamai/cps/testing/
sonar.language=java
I run
sonar-runner -Dsonar.host.url=http://fqdn.sonar.server:9000/sonar
In the output I see:
13:49:59.974 INFO - Sensor SurefireSensor (done) | time=478ms
13:49:59.974 INFO - Sensor JaCoCoSensor
13:49:59.999 INFO - No JaCoCo analysis of project coverage can be done since there is no class files.
13:50:00.000 INFO - Sensor JaCoCoSensor (done) | time=26ms
13:50:00.003 INFO - Sensor JaCoCoItSensor
13:50:00.009 INFO - No JaCoCo analysis of project coverage can be done since there is no class files.
13:50:00.010 INFO - Sensor JaCoCoItSensor (done) | time=7ms
13:50:00.010 INFO - Sensor JaCoCoOverallSensor
13:50:00.016 INFO - Analysing /project/target/jacoco.exec
13:50:00.078 INFO - Analysing /project/target/jacoco-client.exec
13:50:00.138 INFO - No JaCoCo analysis of project coverage can be done since there is no class files.
13:50:00.139 INFO - Sensor JaCoCoOverallSensor (done) | time=129ms
13:50:00.139 INFO - Sensor SCM Sensor
How do I get class files?
I compile the war file in the directory, on this build server, with jacoco activated.
Rsync the war file onto the test server
Restart web tomcat to load the new war file
Send a reset JMX command
run the regression test
Send a dump JMX command
rsync the jacoco-client output file back to the build server.
Run sonar-runner to analyze results
No JaCoCo analysis of project coverage can be done since there is no class files.
--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/79xpfauG9I0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/1a20a06f-d234-4e75-9a37-4df0d28a0154%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.