Code Coverage for ComputerInfoDebugView from #11863
Part of Fixes in https://github.com/dotnet/winforms/pull/11863
Proposed changes
- Add Code Coverage for ComputerInfoDebugView
Customer Impact
- Improve Code Coverage for VB
Regression?
- No
Risk
- None, tests only
Microsoft Reviewers: Open in CodeFlow
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.58947%. Comparing base (
b7c5bee) to head (0337cf4). Report is 3 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #12315 +/- ##
===================================================
+ Coverage 75.58551% 75.58947% +0.00396%
===================================================
Files 3135 3136 +1
Lines 635987 635992 +5
Branches 47024 47023 -1
===================================================
+ Hits 480714 480743 +29
+ Misses 151811 151801 -10
+ Partials 3462 3448 -14
| Flag | Coverage Δ | |
|---|---|---|
| Debug | 75.58947% <100.00000%> (+0.00396%) |
:arrow_up: |
| integration | 18.25377% <0.00000%> (+0.00881%) |
:arrow_up: |
| production | 49.12128% <100.00000%> (+0.00596%) |
:arrow_up: |
| test | 97.02909% <100.00000%> (+0.00202%) |
:arrow_up: |
| unit | 46.07650% <100.00000%> (-0.02283%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
@lonitra I copied the platform exception from the ComputerInfoView and updated the exception testing for non Windows to be Fluent but that code is never hit.
Does this code (and the full version I copied from) ever run on a non Windows platform?
If it never does why is the "else" branch even there in both test files?
Hm, I'm not aware of any test runs we have that run on a non Windows platform so I'm inclined to remove it. 🤔 Perhaps there is some historical context that @KlausLoeffelmann may know as to why that is there?
Hm, I'm not aware of any test runs we have that run on a non Windows platform so I'm inclined to remove it. 🤔 Perhaps there is some historical context that @KlausLoeffelmann may know as to why that is there?
@KlausLoeffelmann @lonitra the Non Debug View has the same code, plus not Fluent. I can remove both, it would make coverage 100% vs very low now.
Let's go ahead and remove it in tests since we do not test on non Windows
Let's go ahead and remove it in tests since we do not test on non Windows
@lonitra it’s removed in my tests of ComputerInfoDebugView. It still exists in the tests for Computer Info, even if it does run on non windows platforms, the “if” is unnecessary because the excluded code should work everywhere.
@lonitra what does untriaged mean?
I cleaned up ComputerInfoTests and made them Fluent
what does untriaged mean?
This is only meant for issues, sometimes bot applies this after removing author feedback label for PRs that I have not been able to investigate yet..