A question about generic test execution

(Yongqiang Li) #1

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube 7.6

  • what are you trying to achieve
    Integrate GoogleTest result into sonarqube and the unit test cases can be drilled down.
    For example, when some unit test failed, developers can easily find which one.

  • what have you tried so far to achieve this
    I followed the schema of generic test execution, converted the XML report of google test and update sonar properties (add sonar.testExecutionReportPaths=uts_report.xml). Inside of the XML, I prepared some failure cases with some messages.

Sonar-scanner ran successfully but when I looked into the analysis. Sonarqube only shows the count of failure cases, without any details.

Where to find the details of the failure?

Attached the screenshot and the uts_report.xml.

2019-02-16_16-26-06

Thanks very much!

(Yongqiang Li) #2

Add the uts_report.xml

uts_report.xml

(Scott) #3

Nowhere. SonarSource dropped the UI that used to show the test details. In SonarQube 7.6 you won’t be able to see that information anywhere.

1 Like
(Yongqiang Li) #4

Thanks for the reply, @Scott.
Do you know which version of Sonarqube supports this function? And is it possible to write some plugins to let Sonarqube show this info?

(Scott) #5

The last version that supported it was SonarQube 7.4. We could open the test file, go to “Show measures” and see the test details:

image

I don’t think it’s possible to write a plugin to show this info. This doesn’t exist in SonarQube 7.5 and newer.

1 Like
How to see which tests were executed
(Yongqiang Li) #6

Many thanks, @Scott.
I will have a try on SonarQube 7.4.

And I personally don’t understand why SonarSource dropped such important feature. Every engineer wants to know where the failure/error is.

(Yongqiang Li) #7

Hi @Scott,

Thanks for your information. I’ve implemented kind of converter to generate the generic test report and it works well.

(Rahul Khandelwal) #8

Hi @yqli1983. Could you please share the converter as I am stuck with the same problem