Google test results integration

I see several posts about the need for integrating google-test results in sonarqube.
We would like to use SonarQube as the “one shop stop” for checking the health of our software components. I believe that google test is such a wide spread testing framework that it deserves to be included when analyzing cpp code. For us, SonarQube could become a “one shop stop”, but a few things limit us from that today. The lack of integration of gTest is currently one of the major deficiencies.

GoogleTest is using the wide spread JUnit format, which sonarQube uses when analyzing Java code. I do not see any reason for the current limitation why JUnit format can not be used when importing GTest results in a cpp analysis project.

I would strongly promote the integration of GTest results in SonarQube!

Hello @jfn98007

Your ask makes sense in your context.
I record your interest.

We have plenty of impactful topics to work on, and I cannot say if/when this one will be tackled at the moment.

You can discover what we are working on and upvote features there.

How is this progressing? Is there any way to monitor this issue?

This is an important issue, at least for my company, where google test is used quite a lot. A lot of other tools integrate google-test (junit) format. Being forced to convert this into other formats is not beneficial.
I consider this as quite important.

Hi @jfn98007

There was some progress, but unfortunately not in the direction you expect.
We are considering dropping support for test results integration as we do not consider it a good metric for assessing code coverage.
There is a card that we put up to collect feedback there.

1 Like

I’m sorry to hear that. We would like to think of SonarQube as a “one stop shop” where the health of our software can be assessed, instead of integrating several different UI’s and API’s to see the software health.
Test results are arguably one very important part of the software health. I was hoping to see integration of GTest/JUnit together with metrics like stability of tests (how many pass in a streak, etc.). Test coverage is a dull tool for reasoning about code or test quality, especially without the test results…

Hi @jfn98007
Thank you for taking the time to provide feedback on this.
I understand the disappointment. A “one-stop shop” is definitely a convenient thing to have.
Even though SonarQube can be a “one-stop shop” in many cases, we strive to keep the value tight around Clean Code and furthermore, in an actionable manner. In that spirit, we try to be very intentional about what is in the product.
For instance, in your case, we would usually consider passing unit tests as a condition for a successful build.