You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore: increase the amount of unit testing
* Fix stack overflow in tests
* remove tests from code coverage by exclusion
* Update claude file
* Further adding tests
* Further testing
* Fix complete names of tests
Improve coverage tests
Copy file name to clipboardExpand all lines: CLAUDE.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,40 @@ The `--treenode-filter` follows the pattern: `/{AssemblyName}/{Namespace}/{Class
98
98
3. Disable `VerifierSettings.AutoVerify()` after accepting
99
99
4. Re-run tests to confirm they pass without AutoVerify
100
100
101
+
### Code Coverage
102
+
103
+
Code coverage uses **Microsoft.Testing.Extensions.CodeCoverage** configured in `src/testconfig.json`. Coverage is collected for production assemblies only (test projects and TestModels are excluded).
104
+
105
+
```powershell
106
+
# Run tests with code coverage (from src/ folder)
107
+
dotnet test --solution ReactiveUI.Binding.SourceGenerators.slnx -c Release -- --coverage --coverage-output-format cobertura
108
+
109
+
# Generate HTML report using ReportGenerator (install if needed: dotnet tool install -g dotnet-reportgenerator-globaltool)
110
+
# Find all cobertura files and generate report to /tmp/<folder>
-`skipAutoProperties: true` — auto-properties excluded from coverage metrics
128
+
129
+
**Tips:**
130
+
- Always clean `bin/` and `obj/` folders before coverage runs to avoid stale results
131
+
- The `ReactiveUI.Binding.GeneratedCode.TestModels` assembly has `[assembly: ExcludeFromCodeCoverage]` so it won't appear in reports even though its module path matches the include pattern
132
+
-`DiagnosticWarnings.cs` coverage appears as 0% in `ReactiveUI.Binding.SourceGenerators` — this is a linked-file artifact; the code is actually tested via the `ReactiveUI.Binding.Analyzer` assembly
133
+
- Put coverage reports in `/tmp/` to avoid accidentally committing them
0 commit comments