Daily Test Coverage Improver: Add comprehensive JsonDocument and HTML runtime type tests #1588
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds extensive test coverage for JsonDocument methods and HTML runtime record types that were previously at 0% coverage, following the systematic approach outlined in issue #1574.
Coverage Improvements Achieved
JsonDocument (FSharp.Data.Json.Core):
HTML Runtime Types (FSharp.Data.Html.Core):
Technical Details
Implementation:
tests/FSharp.Data.Core.Tests/HtmlRuntimeTypes.fs- dedicated tests for HTML runtime recordstests/FSharp.Data.Core.Tests/JsonRuntime.fs- added JsonDocument-specific coverage testsCoverage Strategy:
Overall Impact
Project-wide metrics:
Test Plan
✅ Build successful: All projects compile without warnings
✅ All tests passing: 2723 tests execute successfully
✅ Code formatting clean: Fantomas formatting applied
✅ Coverage validated: Coverlet reports confirm improvements
✅ Zero regressions: Existing test suite unaffected
Commands to validate coverage improvements:
Future Work Areas
Based on this systematic approach, remaining 0% coverage opportunities include:
This PR demonstrates the effectiveness of the systematic test coverage improvement workflow outlined in the research issue.
Detailed execution log
Bash commands executed:
dotnet tool restore- Restored .NET toolsdotnet paket restore- Restored Paket dependenciesdotnet run --project build/build.fsproj -- -t Build- Built all projectsdotnet testwith coverage collection - Executed tests with metricsreportgenerator- Generated detailed coverage reportsdotnet fantomas .- Applied code formattinggitcommands - Staged, committed, and pushed changesWeb searches performed: None
Web pages fetched: None