-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Count catch blocks as branches of the code #472
Comments
FCC just generates a report and provides editor colouring based on the coverage report from the coverage providers - although we do specify to the Ms Code Coverage provider to generate the report as a Cobertura file. The cobertura file is then passed to Report Generator for the report and the data used for the gutters. If we were to not supply a Cobertura file from Ms Code Coverage then we would have an .xml file or a .coverage file. The latter is binary and would need to be converted. Cobertura
.xml and converted
So we can see that ms code coverage does blocks. Whereas Coverlet does Conditional branches. We cannot pass a block coverage report to Report Generator and get branches. This information is available though
So it will be considered when the FCC custom report is finalized, but it will only work with Ms Code Coverage and not Coverlet ( and I expect OpenCover too based on the entry in the Report Generator table ) |
Oh, all right, that makes sense, that we're limited by the features of the underlying tools. Thanks anyway! |
Installed product versions
Description
If my code contains a try/catch block, the catch is not counted as a branch of the code for branch coverage purposes. This can lead to a bizarre scenario where I have 100% branch coverage but the catch block is not covered. I think catch blocks should count as branches for this reason.
Steps to recreate
Current behavior
Branch coverage reported as 100%
Expected behavior
Branch coverage should be reported as less than 100%, because the catch block was not tested.
The text was updated successfully, but these errors were encountered: