How to get total coverage from multiple projects as single unit

Is there any way to show test coverage and tech debt at single place for project which contains multiple micro-services.

We are in one scenario where we are developing project and it has multiple micro-services. currently we are able to see code coverage and tech debt for respective service.

But i was wondering if its any way to see overall code coverage and tech debt of all microservices as singe unit.

Hello @lokesh4846,

There no such feature for the moment even if that may come in the future.
If that’s really important for you, that’s something you can compute with the API:

  • For each microservice, use the API
    api/measures/component?component=<projectKey>&metricKeys= lines_to_cover,conditions_to_cover,uncovered_conditions,uncovered_lines

To retrieve the 4 raw measures about coverage.

  • And then do a simple math:
    Overall coverage = (sum(lines_to_cover)-sum(uncovered_lines)+sum(conditions_to_cover)-sum(uncovered_conditions))/(sum(lines_to_cover)+sum(conditions_to_cover))

If you also want the details on the new code, you have 4 more metrics to collect (the equivalent new_xxx measures) but the idea remains the same.

Olivier

Thank you @OlivierK for your response.