Why my sonarqube don't show coverage on new code?

947 views
Skip to first unread message

lsb...@gmail.com

unread,
Jun 21, 2016, 4:17:55 AM6/21/16
to SonarQube
Hi all
I have test all sonarqube 5.x, all not show coverage on new code. actually I have ever no use this feature before.
test environment
ubuntu server 14.04, 
git 1.9.1
maven 3.2.2
java 1.8.6
I use following comand:
mvn clean cobertura:cobertura -Dcobertura.report.format=xml 

mvn sonar:sonar

following is scan log:
shuaibingli@sha-ls-server:~/git-plugin2.2.5$ mvn sonar:sonar -Dsonar.host.url=http://ec2-52-77-247-36.ap-southeast-1.compute.amazonaws.com:9000
[INFO] Scanning for projects...
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in http://repo.jenkins-ci.org/public/ was cached in the local repository, resolution will not be reattempted until the update interval of repo.jenkins-ci.org has elapsed or updates are forced
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Jenkins GIT plugin 2.2.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in http://repo.jenkins-ci.org/public/ was cached in the local repository, resolution will not be reattempted until the update interval of repo.jenkins-ci.org has elapsed or updates are forced
[INFO]
[INFO] --- sonar-maven-plugin:3.0.2:sonar (default-cli) @ git ---
[INFO] User cache: /home/shuaibingli/.sonar/cache
[INFO] Load global repositories
[INFO] Load global repositories (done) | time=385ms
[INFO] User cache: /home/shuaibingli/.sonar/cache
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=69ms
[INFO] SonarQube version: 5.3
[INFO] Default locale: "en_US", source code encoding: "UTF-8"
[INFO] Process project properties
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=317ms
[INFO] Apply project exclusions
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=82ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=409ms
[INFO] Publish mode
[INFO] -------------  Scan Jenkins GIT plugin
[INFO] Load server rules
[INFO] Load server rules (done) | time=189ms
[INFO] Base dir: /home/shuaibingli/git-plugin2.2.5
[INFO] Working dir: /home/shuaibingli/git-plugin2.2.5/target/sonar
[INFO] Source paths: pom.xml, src/main/java
[INFO] Test paths: src/test/java
[INFO] Binary dirs: target/classes
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] 108 files indexed
[INFO] Quality profile for java: Sonar way
[INFO] JaCoCoSensor: JaCoCo report not found : /home/shuaibingli/git-plugin2.2.5/target/jacoco.exec
[INFO] JaCoCoItSensor: JaCoCo IT report not found: /home/shuaibingli/git-plugin2.2.5/target/jacoco-it.exec
[INFO] Sensor JavaSquidSensor
[INFO] Configured Java source version (sonar.java.source): 5
[INFO] JavaClasspath initialization...
[INFO] JavaClasspath initialization done: 70 ms
[INFO] JavaTestClasspath initialization...
[INFO] JavaTestClasspath initialization done: 109 ms
[INFO] Java Main Files AST scan...
[INFO] 78 source files to be analyzed
[INFO] 68/78 files analyzed, current file: /home/shuaibingli/git-plugin2.2.5/src/main/java/hudson/plugins/git/util/BuildChooserContext.java
[INFO] Java Main Files AST scan done: 11436 ms
[INFO] 78/78 source files have been analyzed
[INFO] Java bytecode scan...
[INFO] Java bytecode scan done: 217 ms
[INFO] Java Test Files AST scan...
[INFO] 30 source files to be analyzed
[INFO] Java Test Files AST scan done: 3028 ms
[INFO] 30/30 source files have been analyzed
[INFO] Package design analysis...
[INFO] Package design analysis done: 15 ms
[INFO] Sensor JavaSquidSensor (done) | time=15326ms
[INFO] Sensor Lines Sensor
[INFO] Sensor Lines Sensor (done) | time=7ms
[INFO] Sensor QProfileSensor
[INFO] Sensor QProfileSensor (done) | time=5ms
[INFO] Sensor CoberturaSensor
[INFO] parsing /home/shuaibingli/git-plugin2.2.5/target/site/cobertura/coverage.xml
[INFO] Sensor CoberturaSensor (done) | time=191ms
[INFO] Sensor SurefireSensor
[INFO] parsing /home/shuaibingli/git-plugin2.2.5/target/surefire-reports
[WARNING] Resource not found: org.jvnet.hudson.test.PluginAutomaticTestBuilder
[WARNING] Resource not found: org.jvnet.hudson.test.junit.FailedTest
[WARNING] Resource not found: org.jvnet.hudson.test.JellyTestSuiteBuilder
[INFO] Sensor SurefireSensor (done) | time=73ms
[INFO] Sensor SmellMeasuresSensor
[INFO] Sensor SmellMeasuresSensor (done) | time=64ms
[INFO] Sensor SCM Sensor
[INFO] SCM provider for this project is: git
[INFO] 60 files to be analyzed
[INFO] 60/60 files analyzed
[INFO] Sensor SCM Sensor (done) | time=761ms
[INFO] Sensor Code Colorizer Sensor
[INFO] Sensor Code Colorizer Sensor (done) | time=3ms
[INFO] Sensor CPD Sensor
[INFO] JavaCpdEngine is used for java
[INFO] Sensor CPD Sensor (done) | time=153ms
[INFO] Analysis report generated in 494ms, dir size=1 MB
[INFO] Analysis reports compressed in 525ms, zip size=583 KB
[INFO] Analysis report uploaded in 1079ms
[INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.102 s
[INFO] Finished at: 2016-06-21T14:50:38+08:00
[INFO] Final Memory: 37M/367M
[INFO] ------------------------------------------------------------------------

lsb...@gmail.com

unread,
Jun 22, 2016, 3:05:21 AM6/22/16
to SonarQube, lsb...@gmail.com
 I found sonarqube can show coverage on new code when I choice over 30 days in dashboard page, it will not show coverage on new code if I don't choice over 30 days in dashboard page, is it normal ? anyone can help me ?

在 2016年6月21日星期二 UTC+8下午4:17:55,lsb...@gmail.com写道:

p.kuma...@gmail.com

unread,
Jan 9, 2017, 3:51:33 PM1/9/17
to SonarQube, lsb...@gmail.com

Even me too facing the same issue, please let know if you find anything on this.

G. Ann Campbell

unread,
Jan 10, 2017, 9:36:05 AM1/10/17
to SonarQube, lsb...@gmail.com, p.kuma...@gmail.com
Hi,

This is a community that offers support on an at-best basis and operates on good will. Please
1) do offer the standard courtesies: Hi, Thanks, &etc.
2) don't resurrect old threads; open new ones
3) don't post the same thing on more than one (old) thread at a time
4) don't use red, bold, or large text. None of those things will make anyone more inclined to help you. Quite the contrary, in fact.
5) do provide details of your environment, how you encountered the problem, and what you've tried to solve it.

As it stands, you've garnered little good will.

I invite you to try again in a new thread.


Ann
Reply all
Reply to author
Forward
0 new messages