Soenneker.Tests.Logging 4.0.154

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Tests.Logging --version 4.0.154
                    
NuGet\Install-Package Soenneker.Tests.Logging -Version 4.0.154
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Tests.Logging" Version="4.0.154" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Tests.Logging" Version="4.0.154" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Tests.Logging" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Tests.Logging --version 4.0.154
                    
#r "nuget: Soenneker.Tests.Logging, 4.0.154"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Tests.Logging@4.0.154
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Tests.Logging&version=4.0.154
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Tests.Logging&version=4.0.154
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Tests.Logging

A base testing class providing logging capabilities.

Install

dotnet add package Soenneker.Tests.Logging

Quick start

using Soenneker.Tests.Logging.Abstract;

ILoggingTest loggingTest = /* resolve from DI */;
await loggingTest.Delay(1, default);

Wraps Task.Delay with a log statement. Should be used for delays in tests.

What you get

  • ILoggingTest — A base testing class providing logging capabilities.

API at a glance

API What it does Result / important behavior
ILoggingTest.Logger Will build and return a Microsoft logger from the static serilog instance (once per UnitTest lifetime). Syntactic sugar for lazy MS Logger. Will build and return a Microsoft logger from the static serilog instance (once per UnitTest lifetime). Syntactic sugar for lazy MS Logger.
ILoggingTest.Delay(millisecondsDelay, reason, log, cancellationToken) Wraps Task.Delay with a log statement. Should be used for delays in tests. A task that completes when the delay operation is complete.

Practical notes

  • Cancellation stops pending work; it does not undo work that has already completed.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Soenneker.Tests.Logging:

Package Downloads
Soenneker.Tests.Unit

A base test providing faker and autofaker capabilities

Soenneker.Tests.Integration

A TUnit base class for integration tests that use a shared WebApplicationFactory host.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.155 15,366 8/30/2026
4.0.154 2,168 8/29/2026
4.0.153 50 8/29/2026
4.0.151 66,942 8/20/2026
4.0.150 30,397 8/11/2026
4.0.149 76,618 7/28/2026
4.0.148 42,542 7/19/2026
4.0.147 32,692 7/16/2026
4.0.146 22,162 7/14/2026
4.0.145 71,753 6/18/2026
4.0.144 63,396 6/9/2026
4.0.143 34,030 6/5/2026
4.0.142 75,206 5/12/2026
4.0.141 70,315 4/22/2026
4.0.140 128 4/22/2026
4.0.139 18,071 4/20/2026
4.0.138 20,535 4/14/2026
4.0.137 55,478 3/12/2026
4.0.132 29,835 3/10/2026
4.0.131 143 3/10/2026
Loading failed

Improve README usability and API guidance