My GIT Repo branch(Project) , when built with Jenkins over AWS slave , generate higher code coverage percentage as compare to GCP slave , though the branch is the same and so are the codebase files .
Ideally both should report exactly the same code coverage %.
Java version : java-1.8.0-openjdk.x86_64
Sonar.plugin.version - 3.2
sonar.core.codeCoveragePlugin - jacoco
jacoco.maven.pllugin.version - 0.7.6.201602180812
Welcome to the SonarSource community. . I hope you’ll enjoy it.
First all all I would like to emphasis that SonarQube (SonarJava) limits itself to reporting what JaCoCo has produced. So if the coverage is different between the 2 environments it’s most likely because JaCoCo reports something different.
Looking at your case, you don’t mention much about your SonarQube environment. Which version of SonarQube, which version of SonarJava ?
I suspect that may be quite old, just for the fact that you also use JaCoCo 0.7.6. That’s too old. One of our prerequisites for recent versions of SonarQube is that you run JaCoCo 0.8.4 or higher (the latest 0.8.5 preferred), that you install the sonar-jacoco plugin and that you configure you build for jacoco to produce the coverage report in XML format. See this guide