Total coverage of all the projects

Sonarqube version 8.2
We are trying to create a dashboard or find a way to show the combined test coverage of all projects listed in the sonarqube.

Hi @himanshu_kansal ,

To create a custom report, you can use the web API on your SonarQube instance, which will show you the documentation.

Or, if you have Enterprise Edition, then you can create a portfolio of all your projects, then it will show you coverage for all the projects.

Joe

Thanks @Joe for replying back.

I will search for the documentation link for fetching the test coverage of all projects. If you have it handy, please share.

On a side note, Is there a way by which we can fetch the UT’s coverage and AT’s coverage separately for a project in sonarqube 8.4.

Thanks
Himanshu

Hi @himanshu_kansal ,

You’re welcome.

The web API documentation is located in your SonarQube UI, it is not publicly available (unless your SonarQube is publicly available).

Regarding UT and AT, UT is unit test but I don’t know what AT means, what is that?

Regards,
Joe

Hi Joe,

Sorry for using acronyms. AT means Acceptance Tests.

-Himanshu

1 Like

Hi @himanshu_kansal ,

Thanks for the explanation. I’m not sure how your AT report is structured so I’m not sure. You will have to test it out and confirm.

The singular coverage value shown on a project’s dashboard represents the how much of the source code has been covered by the unit tests, so separating UT and AT coverage separately is not provided unless both UT and AT reflect source code precisely. You can upload several coverage reports (see Test Coverage & Execution | SonarQube Docs).

See also Metric Definitions | SonarQube Docs (click on “Tests” section) for more information about coverage.

Joe