TracingAssertions 0.1.2
Prefix Reserveddotnet add package TracingAssertions --version 0.1.2
NuGet\Install-Package TracingAssertions -Version 0.1.2
<PackageReference Include="TracingAssertions" Version="0.1.2" />
<PackageVersion Include="TracingAssertions" Version="0.1.2" />
<PackageReference Include="TracingAssertions" />
paket add TracingAssertions --version 0.1.2
#r "nuget: TracingAssertions, 0.1.2"
#:package TracingAssertions@0.1.2
#addin nuget:?package=TracingAssertions&version=0.1.2
#tool nuget:?package=TracingAssertions&version=0.1.2
TracingAssertions
Scope: Test projects only. Not intended for production code.
Framework-agnostic core for the TracingAssertions package family. The TUnit-native fluent assertion entry points ship in the adapter package TracingAssertions.TUnit.
Most users want
TracingAssertions.TUnit, not this package directly. Install this core directly only when authoring a non-TUnit adapter or when you only need the span-capture primitive.
What's in this package
SpanCapture: a disposable, per-test capture that starts a rawActivityListener(samplingAllDataAndRecorded) over one or moreActivitySources matched by name and collects the stoppedSystem.Diagnostics.Activityspans.ForSource(name)/ForSources(names)create one,Capturedexposes the collected spans in completion order, andDispose()detaches the listener. Use it with ausingstatement for per-test isolation.- Query helpers on the capture:
FindByOperationName(name),FindByOperationNameAndTag(name, tagKey, tagValue)(tag compared by invariantToString), andChildrenOf(parent)(direct children in the same trace).
No OpenTelemetry SDK, no exporter pipeline, and no NuGet runtime dependency (System.Diagnostics.DiagnosticSource is in the shared framework). AOT-compatible, trimmable, no runtime reflection.
Install
dotnet add package TracingAssertions.TUnit
The core (TracingAssertions) comes transitively; install it directly only when authoring a non-TUnit adapter for the assertion family.
License
MIT throughout. No runtime dependencies beyond the BCL.
| 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
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TracingAssertions:
| Package | Downloads |
|---|---|
|
TracingAssertions.TUnit
TUnit-native OpenTelemetry distributed-tracing (Activity / span) assertions for .NET tests: fluent Assert.That(activity) entry points for operation name, tag existence and value, status, and single-hop parent/child and same-trace relationships. Span capture is a raw ActivityListener over an ActivitySource. Builds on the TracingAssertions framework-agnostic core. AOT-compatible, trimmable, no runtime reflection in the assertion path, and no NuGet runtime dependency. |
GitHub repositories
This package is not used by any popular GitHub repositories.
View the rendered release notes: https://github.com/JohnVerheij/TracingAssertions.TUnit/releases/tag/v0.1.2
Metadata-only release. No API or behavior change.
### Fixed
- Corrected the NuGet package `<Description>`. It described a foundation release carrying only `HasOperationName` and said the full fluent surface "lands in 0.1.0"; the package has shipped the complete surface (operation name, tag existence and value, status, parent/child, same-trace) since 0.1.0. The description now matches the README.
### Added
- README: a short example showing `.Because(reason)` chained on a span assertion, plus a test covering it. `.Because` is inherited from TUnit's base assertion type and has always worked on the generated span assertions; the note makes that explicit.
### Changed
- The release workflow now publishes the matching `CHANGELOG.md` section as the GitHub release body (`body_path`), so release notes carry the full hand-written detail instead of GitHub's auto-generated commit summary.