I have SP that has the below declaration with index .
CREATE PROCEDURE [dbo].[my_procedure_v1]
AS
BEGIN
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTE
DECLARE @user TABLE (
[name] [varchar](20) NULL,
[age] [int ] NULL,
[ssn] [varchar](20) NOT NULL
PRIMARY KEY (ssn),
INDEX IX01 (name,age,ssn)
)
//DO SOMETHING
END
I am executing tsqlt tests via sqlcover ,
Get-CoverTSql ".\SQLCover.dll" "server=localhost,XXX;User ID=****;Password=******" "db_name" "exec tsqlt.RunAll" -o TestCover
function Get-CoverTSql{
param(
[string]$coverDllPath
,[string]$connectionString
,[string]$databaseName
,[string]$query
)
if(!(Test-Path $coverDllPath)){
Write-Error "SQLCover.dll path was not found ($coverDllPath)"
return
}
Add-Type -Path $coverDllPath
$coverage = new-object SQLCover.CodeCoverage ($connectionString, $databaseName)
$coverage.Cover($query)
}
However when I check the xml report generated , the SP (my_procedure_v1 in this case), doesn’t appear . But when I remove the INDEX that I have on the TABLE variable, it comes up in the xml report. Could you please help guide what is the issue here ? Why is SQLCover filtering out the SP. This is a blocker for us as we have bunch of SP that has a similar pattern.
Hi @GoEddie ,
I have SP that has the below declaration with index .
I am executing tsqlt tests via sqlcover ,
Get-CoverTSql ".\SQLCover.dll" "server=localhost,XXX;User ID=****;Password=******" "db_name" "exec tsqlt.RunAll" -o TestCover
However when I check the xml report generated , the SP (my_procedure_v1 in this case), doesn’t appear . But when I remove the INDEX that I have on the TABLE variable, it comes up in the xml report. Could you please help guide what is the issue here ? Why is SQLCover filtering out the SP. This is a blocker for us as we have bunch of SP that has a similar pattern.
Thanks, Priya