Hello,
After last failed attempt to resolve this, we have started working this again.
SQ version 7.9
Here are the steps we are performing,
- Compile the database solution
- Deploy a TSQLT dacpac on to database
- Ran below ps1 to run the tsqlt tests and generate the reports,
$baseDir = "C:\Users\xxx\SQLCover-0.5.0\src\SQLCover\releases\template"
$database = "TestDBName"
$server = "."
$coverageOutputDir = "C:\Users\xxx\SQLCover-0.5.0\src\SQLCover\releases\results"
. "$baseDir\SQLCover.ps1"
$results = Get-CoverTSql "$baseDir\SQLCover.dll" "server=$server;initial catalog=$database;integrated security=true;" "$database" "exec tSQLt.RunAll"
New-Item -ItemType Directory -Force -Path $coverageOutputDir*
Export-OpenXml $results $coverageOutputDir
Export-Html $results $coverageOutputDir
which gave Coverage.opencoverxml and Coverage.html
- Per your suggestion used the tool below to convert the Coverage.opencoverxml to sonarqube generic data
GitHub - jmecosta/OpenCover2SonarConverter: Converts OpenCover to SonarQube format - Passed this generic data file to SQ prepare task using sonar.coverageReportPaths.
sonar.coverageReportPaths=$(Build.SourcesDirectory)\Databases\merged.cov.json
Still no signs of code coverage Metrix on sonarqube dashboard ![]()
Can you please let me know what are we missing?
Has anyone successfully ever integrated the TSQLT code coverage with SQ?
Is this because of the older version of SQ? Do you think we’ll be able re resolve this by upgrading the version to latest?
Any leads would greatly be appreciated.
Thanks