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

Branch coverage dropped with opencover report #329

Closed
tfadler opened this issue Mar 4, 2020 · 5 comments
Closed

Branch coverage dropped with opencover report #329

tfadler opened this issue Mar 4, 2020 · 5 comments
Labels

Comments

@tfadler
Copy link

tfadler commented Mar 4, 2020

This is with a .net framework 4.7.2 application.

Opencover 4.7.922

When going from reportgenerator 4.2.10 to latest (4.5.0), I see a drop in branch coverage. Mostly around async and await...though you can see it on my if too.

I can provide the coverage report XML if needed.

On earlier version
image

On current version
image

@danielpalme
Copy link
Owner

danielpalme commented Mar 5, 2020

The XML would be helpful: danielpalme82@gmail.com

@tfadler
Copy link
Author

tfadler commented Mar 6, 2020

Sent. Thank you sir!

@danielpalme
Copy link
Owner

if you look at line 36055 you can see the relevant branches of your class Session

<BranchPoint vc="0" uspid="6265" ordinal="8" offset="263" sl="87" path="0" offsetend="265" fileid="573" />
<BranchPoint vc="0" uspid="6266" ordinal="9" offset="263" sl="87" path="1" offsetend="333" fileid="573" />
<BranchPoint vc="0" uspid="6267" ordinal="10" offset="376" sl="88" path="0" offsetend="378" fileid="573" />
<BranchPoint vc="0" uspid="6268" ordinal="11" offset="376" sl="88" path="1" offsetend="448" fileid="573" />
<BranchPoint vc="0" uspid="6269" ordinal="12" offset="503" sl="89" path="0" offsetend="505" fileid="573" />
<BranchPoint vc="0" uspid="6270" ordinal="13" offset="503" sl="89" path="1" offsetend="528" fileid="573" />

All lines from 87 to 89 contain 2 branches.
0 of them are covered/executed.
Attribute sl contains the line number, attribute vc indicates the number of executions

That means that the HTML report shows exactly the branch information from the OpenCover file.
The question is why is none the branches marked as covered/executed?!
All of the lines are executed, so at least some branches should be covered as well.

@danielpalme
Copy link
Owner

@danielpalme
Copy link
Owner

I'm closing this issue since ReportGenerator parses the coverage file correctly.
The coverage file itself seems to be not correct.

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

No branches or pull requests

2 participants