Skip to content

Coverage: replace dotcover.xml with coverage.runsettings (net10) - #344

Merged
rwmcintosh merged 3 commits into
developfrom
fix/dotcover-2026.2
Jul 25, 2026
Merged

Coverage: replace dotcover.xml with coverage.runsettings (net10)#344
rwmcintosh merged 3 commits into
developfrom
fix/dotcover-2026.2

Conversation

@rwmcintosh

@rwmcintosh rwmcintosh commented Jul 24, 2026

Copy link
Copy Markdown
Member

Problem

The scheduled coverage job cannot produce a report on net10. dotCover 2026.2.0 (the only version that instruments .NET 10) hangs/crashes in report generation (DCVR-13230, open); older versions cannot instrument net10.

Fix

Switch to dotnet test + the Microsoft Code Coverage collector (net10-capable, cobertura for codecov), driven by the shared action (Workflows#247). This repo:

  • replaces dotcover.xml with coverage.runsettings (module/source exclusions preserved),
  • drops the obsolete xml-configuration input,
  • bumps Microsoft.NET.Test.Sdk 17.1.0 → 17.13.0 (older versions lack cobertura output support on net10).

Verified the mechanism locally end-to-end on a net10 NUnit project.

🤖 Generated with Claude Code


Update — UI exclusion added. A second commit excludes the UI layer from coverage (Views/WinForms cannot be exercised by the test infrastructure), replacing the per-repo UI Views source exclude with a whole UI module exclude. This is on top of the test-assembly exclusion, so coverage reflects testable product code. Verified on net10 that the *.UI.dll ModulePath exclude drops the UI assembly from the report.

IV note: there is no dedicated *.UI assembly here — the untestable UI/application layer is the InstallationValidator and SimulationOutputComparer assemblies (tests reference only InstallationValidator.Core), so those two modules are excluded.

JetBrains dotCover 2026.2 cannot generate a coverage report on .NET 10
(console runner hangs/crashes - DCVR-13230). The shared coverage action now
runs dotnet test with the Microsoft Code Coverage collector, which supports
net10 and emits cobertura for codecov. Replace dotcover.xml with a
coverage.runsettings carrying the module/source exclusions, drop the obsolete
xml-configuration input, and bump Microsoft.NET.Test.Sdk to 17.13.0 (older
versions do not support cobertura output on net10).
Tests reference only InstallationValidator.Core; the InstallationValidator and
SimulationOutputComparer assemblies are the UI/application layer and are not
exercised by the test infrastructure. Exclude them as modules.
@rwmcintosh
rwmcintosh requested review from Yuri05 and msevestre July 24, 2026 19:36
Comment thread coverage.runsettings Outdated
Comment on lines +17 to +18
<ModulePath>.*[\\/]InstallationValidator\.dll$</ModulePath>
<ModulePath>.*[\\/]SimulationOutputComparer\.dll$</ModulePath>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and why excluding this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are actually not doing anything, they are excluded because they're WinForms projects, but they wouldn't be used anyway in the stats because the test assembly doesn't depend on them. I'll remove these.

InstallationValidator and SimulationOutputComparer are WinForms executables that
reference InstallationValidator.Core (not vice versa) and are not referenced by
the test project, so dotnet test never loads them and they never appear in the
coverage report. Excluding them was a no-op.
@rwmcintosh
rwmcintosh merged commit e7e5031 into develop Jul 25, 2026
2 checks passed
@rwmcintosh
rwmcintosh deleted the fix/dotcover-2026.2 branch July 25, 2026 13:21
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

Successfully merging this pull request may close these issues.

2 participants