GoEddie / GoEddie/SQLCover

Cannot use or export using Cobertura on CoverageResult

Open
#65 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TSQL
Stars
69
Forks
55
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I am able to run and get coverage result using Get-CoverTSql PowerShell wrapper function.
Source has a the public string Cobertura(string packageName = "sql", Action customCoverageUpdater = null) line 315 but the method is not visible when consuming in powershell

**To Reproduce**
Steps to reproduce the behavior:
1. Run $result = Get-CoverTSql "$openCoverSourceFolder\SQLCover.dll" $connectionString $databaseName $runtSQLtTestsCmd
2. Try to run $result.Cobertura()
4. See error
Method invocation failed because [SQLCover.CoverageResult] does not contain a method named 'Cobertura'.
At line:1 char:1
+ $result.Cobertura()
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound

**Expected behavior**
$result = Get-CoverTSql "$openCoverSourceFolder\SQLCover.dll" $connectionString $databaseName $runtSQLtTestsCmd
$result.Cobertura() | Out-File $path
$result.SaveSourceFiles($reportPath)

@GoEddie

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the public Cobertura method on CoverageResult around line 315 and review how SQLCover.dll is consumed by the Get-CoverTSql PowerShell wrapper. Reproduce the $result.Cobertura() call, then verify the method is callable from PowerShell and that its output can be piped to a file as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, sql
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.