FsHotWatch.Coverage
0.3.0-alpha.1
dotnet add package FsHotWatch.Coverage --version 0.3.0-alpha.1
NuGet\Install-Package FsHotWatch.Coverage -Version 0.3.0-alpha.1
<PackageReference Include="FsHotWatch.Coverage" Version="0.3.0-alpha.1" />
<PackageVersion Include="FsHotWatch.Coverage" Version="0.3.0-alpha.1" />
<PackageReference Include="FsHotWatch.Coverage" />
paket add FsHotWatch.Coverage --version 0.3.0-alpha.1
#r "nuget: FsHotWatch.Coverage, 0.3.0-alpha.1"
#:package FsHotWatch.Coverage@0.3.0-alpha.1
#addin nuget:?package=FsHotWatch.Coverage&version=0.3.0-alpha.1&prerelease
#tool nuget:?package=FsHotWatch.Coverage&version=0.3.0-alpha.1&prerelease
FsHotWatch.Coverage
Plugin that checks code coverage thresholds after tests complete. It reads Cobertura XML coverage reports and compares line and branch coverage against per-project thresholds.
Why
Coverage checking is usually a separate CI step that runs after all tests.
With FsHotWatch, the CoveragePlugin reacts to TestCompleted events
and checks thresholds immediately, so you get instant feedback on whether
your changes dropped coverage below the minimum.
How it works
- TestPrune runs your tests (with coverage flags)
- Tests produce Cobertura XML reports in the coverage directory
- CoveragePlugin receives
TestCompleted - It parses the XML reports and compares against thresholds
- Projects below threshold are reported as errors
Configuration
In .fs-hot-watch.json:
{
"coverage": {
"directory": "./coverage",
"thresholdsFile": "coverage-thresholds.json"
}
}
| Field | Type | Default | Description |
|---|---|---|---|
directory |
string |
"./coverage" |
Directory containing Cobertura XML coverage reports. |
thresholdsFile |
string |
-- | Path to JSON file with per-project coverage thresholds. |
Thresholds file format
{
"MyApp.Tests.Unit": { "line": 85.0, "branch": 70.0 },
"MyApp.Tests.Integration": { "line": 60.0, "branch": 50.0 }
}
Each key is a test project name. line and branch are minimum
percentages (0-100). Projects not listed in the thresholds file are
not checked.
CLI
# Query coverage results
fs-hot-watch coverage
Programmatic usage
daemon.RegisterHandler(
CoveragePlugin.create
"./coverage" // coverage report directory
(Some "coverage-thresholds.json") // thresholds file
None // afterCheck callback
None // getCommitId for caching
)
Install
dotnet add package FsHotWatch.Coverage
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FSharp.Core (>= 10.1.201)
- FsHotWatch (>= 0.3.0-alpha.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.0-alpha.1 | 34 | 4/8/2026 |
| 0.1.0-alpha.1 | 49 | 4/3/2026 |