Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use or export using Cobertura on CoverageResult #65

Open
Gwayaboy opened this issue Nov 28, 2020 · 1 comment
Open

Cannot use or export using Cobertura on CoverageResult #65

Gwayaboy opened this issue Nov 28, 2020 · 1 comment

Comments

@Gwayaboy
Copy link

Gwayaboy commented Nov 28, 2020

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()
  3. 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

@shortall
Copy link

shortall commented Feb 18, 2021

@Gwayaboy I had the same problem initially when I tried running the script that lives in

SQLCover-0.5.0\src\SQLCover\releases\template\SQLCover.ps1

Having updated it to produce a Cobertura export. I then realised the version of the dll that lives in that folder is an older version - 0.2.1 which doesn't have that method.

If you build yourself a dll from the 0.5.0 source code you should find it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants