How to get Code Coverage showing in Sonar Cloud for maven project

After I integrate sonarcloud in CI bitbucket pipeline, I find out that the coverage is 0.0%.
How can I activate it ?

  • How is your Bitbucket Pipelines YAML file configured?
  • Have you read the documentation for Java Test Coverage?

I added Jacoco to the pom file. When I run it locally " mvn test" no report is generated.

As SonarQube only reads reports and is not involved in producing them, you’ll need to address that first. Maybe you’ll find this guide helpful: