which versions are you using: Enterprise Edition Version 8.9.4 (build 50575)
what are you trying to achieve: Separate reports for Unit & Integration tests
what have you tried so far to achieve this: Searched online
I can see from many posts that changes were made years ago to combine Unit & Integration test code coverage. I can also see that this is a popular request on the community.
Are there any plans to make this configurable so that users can decide to display a combined or separate report?
Since you start by acknowledging that this feature doesn’t exist (and I’m not aware of any plans for it) , I’ve moved your thread to Product Manager for a Day.
Now we just need to get the full-time PMs interested. To do that, can you flesh out the topic template, please?
Try to describe the problem or opportunity you are seeing and why it matters. The closer you stick to this topic template, and the more information you provide, the better chance you have to generate a real discussion.
What are you trying to accomplish?
To view the code coverage for Unit Tests and Integration Test separately
Why does this matter to you?
For the unit tests we will be mocking things, in the integration tests it is interacting with the other services. So we want to see we are covering the same parts of the code with the integration tests that we do with the unit tests.
How would that look in SonarQube? Alternatives?
At the Overview level it wouldn’t look any different, but in the Measures tab under Coverage it would break things down.
How would we know it works well?
Not sure who to answer this one. If it displayed the coverage for both Unit Test and Integration Tests separately is would be working well.
Why should it be a priority now?
It gives the users a greater choice on how they want to review their code.
Apologies for the slow response, its a busy period for the SonarQube PMs with the new LTS about to release
Thanks for sharing this request. It’s an interesting idea and we’d love to do more around test analysis and displaying coverage. It’s not something that’s on our roadmap at the moment but I’ll add your idea into our Product Management system and hopefully it’s something we can start to explore when time allows.
I was looking for such a feature too, Actually it could be very useful to control and support correct testing piramide because the overall coverage metric did not provide visibility of the proportion of the tests. On Java/Gradle side I could generate 2 Jacoco reports, one for Unit tests and one for Integration tests and pass it to sonar, after that I expect to configure some quality gates based on Overal, Unit and Integration metrics.
Thanks for adding your voice here. It’s not something we are working on or have planned, but we will review this and I will update this thread if it does get prioritized.