Produce code coverage from Azure Devops pipeline
When using the Redgate Change automation plugin for Azure DevOps pipelines, I wish to be able to run the tests AND produce the code coverage.
We can create the code coverage from SSMS, and it would seem to be available from Powershell, but it's not available from the Plugin.
We wish to expose this so that we can add a code coverage quality gate on Pull requests.
The sqlcodeguard.exe command line may help with this request. The command line is in ‘preview’ mode and we value your further/continued feedback if you like the feature.
-
Ian Wilkinson commented
Hi @Kendra and @David,
I had a look at this, but this doesn't look like it'll work with the existing task.
I think I'm correct in saying that the existing task deploys the nuget package to a temp SQL server which I don't have access to for running this task.
Can you suggest a way this task can be run in an Azure Devops pipeline with a nuget package as the source?
Thanks,
-
Ian Wilkinson commented
Hi Both @David Atkinson and @Kendra,
Thanks for the responses, I didn't get any notification about this and thought I'd check up on it.
SQLCodeGuard sounds interesting, does this replace the "Redgate Change automation plugin" we are using in our Azure Devops pipeline, or is it used alongside?
Also is it possible to use this with SonarCloud or is it only SonarQube?
Thanks again!
-
@Ian Wilkinson - have you tried the sqlcodeguard.exe command line for this purpose? https://documentation.red-gate.com/scg/sql-code-analysis-documentation/code-analysis-for-sql-server-command-line