Hello All,
I have this below Clover report generated in xml format.(see the Clover xml report snippet below)
This report has, clover code coverage details. This also has unit test details included(mostly numbers).
I need to import this report onto SonarQube. I have installed clover plugin.
Now, I am trying to run Sonar analysis, by passing '-Dsonar.clover.reportPath' property set to this xml report path.
However I am not able to see the clover coder coverage details in the sonarQube.
PFA Clover xml report snippet, & Sonar Qube Execution console Logs
I have Below Questions:
1. Do I need to pass, JUNIT test reports (xml) as well, for clover details to be seen? As I am only passing clover xml report details? I am using simple "SonarQube Scanner Command Line"
2. I am also seeing below data in the logs. On one side it says, Matched files in the clover report as 99% which is good. & on other side, it says, 0/0 source files have been analysed. What does one make out of this?
INFO: Sensor org.sonar.plugins.clover.CloverSensor
INFO: 0/0 source files have been analyzed
INFO: Parsing C:\SonarQube\clover_xmlReport.xml
INFO: Matched files in report : 99%
WARN: 29 files in clover report did not match any file in SonarQube Index
INFO: Sensor org.sonar.plugins.clover.CloverSensor (done) | time=577ms
Please Help !!
### Clover xml report snippet:
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1474616508950" clover="4.0.2">
<project timestamp="1474034151136">
<metrics coveredelements="248984" complexity="108766" loc="908606" methods="43252" classes="5131" statements="250094" packages="692" coveredconditionals="50108" coveredmethods="29668" elements="382096" ncloc="568483" files="4572" conditionals="88750" coveredstatements="169208"/>
<package name="com.common.encrypt">
<metrics coveredelements="1739" complexity="744" loc="6004" methods="299" classes="37" statements="1838" coveredconditionals="315" coveredmethods="239" elements="2763" ncloc="3802" files="31" conditionals="626" coveredstatements="1185"/>
<file path="C:\Users\Administrator\SonarQube_Source\ars\main\server\common\common\encrypt\ARCryptoConstants.java" name="ARCryptoConstants.java">
<metrics coveredelements="0" coveredconditionals="0" complexity="1" loc="553" coveredmethods="0" methods="1" elements="1" classes="1" ncloc="242" statements="0" conditionals="0" coveredstatements="0"/>
<class name="ARCryptoConstants">
<metrics coveredelements="0" coveredconditionals="0" complexity="1" coveredmethods="0" methods="1" elements="1" statements="0" conditionals="0" coveredstatements="0"/>
</class>
</file>
### Sonar Qube Execution console Logs:
INFO: Java Main Files AST scan
INFO: 13251 source files to be analyzed
INFO: Java Main Files AST scan (done) | time=735591ms
INFO: 13251/13251 source files have been analyzed
WARN: Java bytecode has not been made available to the analyzer. The are disabled.
INFO: Java Test Files AST scan
INFO: 0 source files to be analyzed
INFO: Java Test Files AST scan (done) | time=0ms
INFO: Sensor JavaSquidSensor (done) | time=736069ms
INFO: Sensor org.sonar.plugins.clover.CloverSensor
INFO: 0/0 source files have been analyzed
INFO: Parsing C:\SonarQube\xmlReport_Updated.xml
INFO: Matched files in report : 99%
WARN: 29 files in clover report did not match any file in SonarQube Index
INFO: Sensor org.sonar.plugins.clover.CloverSensor (done) | time=577ms
INFO: Sensor SCM Sensor
INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
INFO: Sensor SCM Sensor (done) | time=1ms
INFO: Sensor SurefireSensor
INFO: parsing C:\SonarQube\JunitReports
INFO: Sensor SurefireSensor (done) | time=227ms
INFO: Sensor JaCoCoSensor
INFO: JaCoCoSensor: JaCoCo report not found : C:\Users\Administrator\SonarQube_Source\ars\main\server\target\jacoco.exec
INFO: Sensor JaCoCoSensor (done) | time=0ms
INFO: Sensor JaCoCoItSensor
INFO: JaCoCoItSensor: JaCoCo IT report not found: C:\Users\Administrator\SonarQube_Source\ars\main\server\target\jacoco-it.exec
INFO: Sensor JaCoCoItSensor (done) | time=0ms
INFO: Sensor JaCoCoOverallSensor
INFO: Sensor JaCoCoOverallSensor (done) | time=1ms
INFO: Sensor XmlFileSensor
INFO: Sensor XmlFileSensor (done) | time=61ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=1313ms
INFO: Sensor Code Colorizer Sensor
INFO: Sensor Code Colorizer Sensor (done) | time=316ms
INFO: Sensor CPD Block Indexer
INFO: JavaCpdBlockIndexer is used for java
INFO: Sensor CPD Block Indexer (done) | time=13929ms
INFO: Calculating CPD for 10249 files