-
Notifications
You must be signed in to change notification settings - Fork 385
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
[BUG] Records Result in No Coverage #1607
Comments
Not sure, at least in your example I'm pretty sure it is something different. You have the unit test and the record under test in the same assembly. This doesn't work. The |
@daveMueller Yikes, sorry in my haste to create a minimum viable reproducing test case I didn't realize that coverlet excludes the test assembly. The second part of your comment (the uncovered line) is exactly what we're seeing "in production" and why we were reporting. The fix with #1575 looks like what we want to do, on Monday I'll upgrade to the nightly build and see if that fixes our wagon. Thank you so much for following up on this so quickly! |
@daveMueller I can confirm that the latest nightly fixes the issue "in production" we'll look forward to the latest NuGet Release, thank you again. Closing as resolved. |
Describe the bug
Maybe a duplicate of #1576 ? We've been seeing this since we really started looking at our coverage last December but finally got around to a bug report today...
It appears that no coverage is detected for
record
types?To Reproduce
Consider the following toy program (Including Azure DevOps Pipeline):
SingleFieldRecord.cs
SingleFieldRecordTests.cs
CodeCoverageSingleFieldNotCovered.csproj
CodeCoverageSingleFieldNotCovered.sln
azurepipeline.yml
Expected behavior
When you run this in Azure DevOps Pipeline you'd expect the coverage to get published and it show as 100%
Actual behavior
Running the above in Azure DevOps the publish task will fail.
If you crack open the coverage.cobertura.xml you'll see that no coverage was reported:
You can reproduce this locally (No need for Azure DevOps Pipeline) with:
The text was updated successfully, but these errors were encountered: