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

Allign to the OpenCover format https://github.com/csMACnz/coveralls.net is using #77

Open
snowliver opened this issue May 6, 2022 · 0 comments

Comments

@snowliver
Copy link

Hi @GoEddie and thanks for your efforts.

There is a fileid attribute on each SequencePoint.
https://github.com/OpenCover/opencover/blob/e715910bb52e327ae6df059aeea71dff4b54ee50/main/OpenCover.Framework/Model/SequencePoint.cs#L35

I'm directly feeding it into the coveralls uploader https://github.com/csMACnz/coveralls.net, without using the reportgenerator.

For now, I use this Powershell snippet as a workaround, to make it working in my TeamCity Build.

[xml]$xmldocument = Get-Content -Path "./SQLCoverResults.xml"
Foreach ($class in ($xmldocument.CoverageSession.Modules.Module.Classes.GetElementsByTagName("Class"))) {
    $fileref = $class.Methods.Method.FileRef.uid
    foreach ($SequencePoint in $class.Methods.Method.SequencePoints.GetElementsByTagName("SequencePoint")) {
        $SequencePoint.Setattribute("fileid",$fileRef)
    }
}
$xmldocument.Save("./SQLCoverResults_2.xml");`

Not sure if you see this issue more here or in coveralls.net .

Thanks Oli

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

1 participant