Coverage is Also 0% in the jenkins build

jenkins

(Jerry) #1

I got some problem,My Covergae is Also 0%,Project is using Java language by Gradle

Jenkins Analysis properties

sonar.projectKey=sens-server-storge
sonar.projectName=sens-server-storge
sonar.projectVersion=1.0-SNAPSHOT
sonar.sourceEncoding=UTF-8
sonar.sources=sens-server-storge/src
sonar.java.binaries=./

This is my logs build by Jenkins
Java 1.8.0_77 Oracle Corporation (64-bit)

Details:https://github.com/SonarOpenCommunity/sonar-cxx/issues/1497


(G Ann Campbell) #2

Hi,

First, if you’re building with Gradle, you’d be better off analyzing with Gradle via the SonarQube Scanner for Gradle. Second, nowhere in your list of properties are you passing a code coverage report. This may help:

https://docs.sonarqube.org/display/PLUG/Code+Coverage+by+Unit+Tests+for+Java+Project

Ann


(Jerry) #3

Thanks,
The SonarQube Scanner for Gradle is also for the project which builded in local system, if use Jenkins ,I think it’s not necessary.