In order to see test coverage data on SonarCloud, the following is needed:
- Test coverage report files, in some format supported by SonarCloud.
- The scanner needs to find the report files to import them. Usually it can find the report files at typical locations, when in doubt, it’s best to specify the locations explicitly.
To answer the first requirement (report files in some supported format), I reviewed our documentation on Test Coverage, which mentions nothing about SQL. Indeed our teams confirm that our TSQL plugin doesn’t have specific logic to directly import TSQL coverage reports such as the ones mentioned in this thread.
In such case, the alternative is to use Generic Test Data. This is a generic format that we support, explained on that doc page. That is, in order to see test coverage data for TSQL, you need to convert your reports from coveragexml format to this custom format, and tell the scanner the path to the generated report files using the
A quick search led me to this tool:
I’m not sure if this will work with your current report format, or if changing your report format to OpenCover is possible for you. I hope this may help you get started.