Coverage of Java project

I am generating code coverage report with Jacoco and Sonarqube in my Java mvn project. sonarqube is running local docker using latest image.

  1. I’m able to see most of metrics like bugs, vulnerabilities, code smell etc.
    However for code coverage, it is showing 0 for both new code and overall. There are many unit tests on the project so the overall shouldn’t be 0. Is there any settings I need to enable?

  2. For new code, is it just compare new metrics with the existing metrics? I’d like to setup tracking of new code as compare to another branch in the git. For example I have a branch master in the git, I can branch out feature/abc, I’d like to track the new code as the difference between branch feature/abc and branch master, is this possible? how to set it up?



Welcome to the community!

It’s best to keep it to one question per thread, so you probably want to create a new thread for #2. For #1, how are you passing your coverage report into analysis?


1 Like

Thanks Ann for your response.

I will follow your suggestion in the future. For #1, I’ve figured it out and there is a configuration issue.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.