SonarCloud - seeing Test Results

Hi,

I have successfully integrated my Azure DevOps builds with SonarCloud and I can see the results of my analysis, including the code coverage within Sonar, however I cannot see how many NUnit tests where run (I can see that info my Azure DevOps Build page results).

Does SonarCloud display the number of tests run? If so, on which page? Can someone share a screenshot so I can double check I am not looking in the wrong place?

Thanks
Alex

I found it.

The issue seems to be that the default folder the SonarCloud extension looks for the test result file is not looking in the right place, from the logs:

Attempting to locate a test results (.trx) file…
Looking for TRX files in: c:\agent-work\1059\TestResults
No test results files found
Did not find any binary coverage files in the expected location.

Adding this line to the Additional Properties on the Prepare Analysis Configuration step solves the issue

sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)\TestResults\*.trx

I can now see my solitary unit test in the project’s overview page under the coverage section:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.