![]() |
VOOZH | about |
dotnet add package Rig.TUnit.HealthChecks --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.HealthChecks -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.HealthChecks" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.HealthChecks" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.HealthChecks" />Project file
paket add Rig.TUnit.HealthChecks --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.HealthChecks, 0.1.0-beta.2"
#:package Rig.TUnit.HealthChecks@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.HealthChecks&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.HealthChecks&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
HealthAssertfluent assertions for ASP.NET Core health endpoints +DependencyDownSimulatorfor dependency-flip testing.
A small but opinionated health-check testing kit. HealthAssert.On( client, "/health/ready").Contains("database").IsHealthy().InTime(…)
encodes the full assertion shape in one line. DependencyDownSimulator
lets a test mark a named dependency unhealthy and verify the
live/ready/startup probe reports correctly — the standard way to
catch probe mis-wirings before they cascade in production.
/health/live, /health/ready,
/health/startup endpoints.IHealthCheck implementations
— use the ASP.NET Core HealthCheckContext directly.services.AddHealthChecks() with named checks.using Rig.TUnit.HealthChecks;
await HealthAssert.On(client, "/health/ready")
.Contains("database")
.IsHealthy()
.InTime(TimeSpan.FromSeconds(1));
| Property | Type | Default | Description |
|---|---|---|---|
DefaultTimeout |
TimeSpan |
5s |
Per-probe call deadline |
ProbeKind |
ProbeKind |
Ready |
Live / Ready / Startup |
RequireJsonBody |
bool |
true |
Fail when response isn't JSON |
Rig.TUnit.HealthChecks.HealthAssertRig.TUnit.HealthChecks.DependencyDownSimulatorRig.TUnit.HealthChecks.ProbeKindHelpers are stateless. DependencyDownSimulator scopes its overrides
per-test via IAsyncDisposable — disposal restores normal health.
Safe under full parallelism.
HealthAssert.Contains("database") fails despite DB check
registered — the check's name must match. Registrations like
AddDbContextCheck<TDbContext>("database") set the name; without it
ASP.NET Core uses the class name.InTime(…) fails intermittently — the first probe call pays
for JIT / connection-pool warm-up; run a warm-up call before the
timed assertion.See .
/health endpoint returns Content-Type: text/plain
by default; set ResponseWriter = UIResponseWriter.WriteHealthCheck UIResponse (from AspNetCore.HealthChecks.UI.Client) for JSON,
which HealthAssert expects.ProbeKind.Startup probes exist in Kubernetes contracts but not all
apps define them — HealthAssert returns a documented no-op.See ;
baseline in benchmarks/baseline-005.json.
MIT. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Rig.TUnit.HealthChecks:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 75 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 75 | 4/26/2026 |