Babelserver.DotNet.TestLogger
3.2.0
dotnet add package Babelserver.DotNet.TestLogger --version 3.2.0
NuGet\Install-Package Babelserver.DotNet.TestLogger -Version 3.2.0
<PackageReference Include="Babelserver.DotNet.TestLogger" Version="3.2.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Babelserver.DotNet.TestLogger" Version="3.2.0" />
<PackageReference Include="Babelserver.DotNet.TestLogger"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Babelserver.DotNet.TestLogger --version 3.2.0
#r "nuget: Babelserver.DotNet.TestLogger, 3.2.0"
#:package Babelserver.DotNet.TestLogger@3.2.0
#addin nuget:?package=Babelserver.DotNet.TestLogger&version=3.2.0
#tool nuget:?package=Babelserver.DotNet.TestLogger&version=3.2.0
Babelserver.DotNet.TestLogger
A test logger for dotnet test listing all tests run, one by one.
Note
If you're using xUnit, don't use this package directly. Use Babelserver.DotNet.TestAdapter.xUnit instead, which includes this logger automatically plus an xUnit adapter that suppresses xUnit's console noise.
Install this package directly only if you're using NUnit or MSTest (not xUnit).
Usage (NUnit/MSTest)
<PackageReference Include="Babelserver.DotNet.TestLogger" Version="3.2.0" />
Then run:
dotnet test --logger list
Output
Parameterized tests are grouped by default:
✅ MyTheoryTest (4 runs) (10ms)
If some runs fail:
❌ MyTheoryTest (2/4 runs failed) (10ms)
► MyTheoryTest(input: 2, expected: 3)
Error: Assert.Equal() Failure...
To show every parameterized test individually instead:
dotnet test -- Babelserver.CollapseTheories=false
✅ MyTheoryTest(input: 1, expected: 2) (2ms)
✅ MyTheoryTest(input: 2, expected: 4) (1ms)
✅ MyTheoryTest(input: 3, expected: 6) (0ms)
Verbosity
By default, all tests are listed individually. Use Verbosity to reduce output:
# Only show failed tests and summary (great for CI)
dotnet test --logger "list;Verbosity=minimal"
# Just a one-line pass/fail summary
dotnet test --logger "list;Verbosity=quiet"
minimal with failures:
────────────────────────────────────────────────────────────
T E S T S
────────────────────────────────────────────────────────────
❌ DeleteUser_WhenNotFound_ThrowsException (3ms)
Error: Expected exception but none was thrown
────────────────────────────────────────────────────────────
❌ Tests: 42, Passed: 41, Failed: 1, Skipped: 0
────────────────────────────────────────────────────────────
minimal when all pass, and quiet in both cases:
✅ Tests: 42, Passed: 42, Failed: 0, Skipped: 0
Console Output Suppression
Direct console output from test code (e.g. ASP.NET host logging, Kafka clients) is suppressed by default. The logger's own output (test results, summary) is unaffected.
To disable suppression:
dotnet test --logger "list;SuppressConsoleOutput=false"
Test Output (ITestOutputHelper)
When tests fail, output written via ITestOutputHelper (xUnit) or equivalent is shown automatically:
❌ CreateUser_WhenDuplicate_Throws (12ms)
Output:
Debug: created user with id 42
Debug: attempting to create duplicate...
Error: Expected DuplicateException but got none
To also show output for passing tests (useful for debugging):
dotnet test --logger "list;ShowTestOutput=always"
To disable output completely:
dotnet test --logger "list;ShowTestOutput=never"
Slow Test Highlighting
Tests that exceed a duration threshold are highlighted with a warning marker:
✅ FastTest (12ms)
✅ SlowTest (2.5s) ⚠
✅ VerySlowTest (15.0s) ⚠
- Slow (default: 2000ms) — duration shown in yellow with ⚠
- Very slow (default: 10000ms) — duration shown in red with ⚠
For grouped theories, the threshold is evaluated against the slowest individual run, not the sum.
To customize:
dotnet test --logger "list;SlowThresholdMs=1000;VerySlowThresholdMs=5000"
Set to 0 to disable:
dotnet test --logger "list;SlowThresholdMs=0;VerySlowThresholdMs=0"
Stack Trace Filtering
Framework-internal stack trace lines are automatically filtered out, showing only your code:
❌ CreateUser_WhenDuplicate_Throws (3ms)
Error: Expected DuplicateException but got none
at MyApp.Tests.UserTests.CreateUser_WhenDuplicate_Throws() in /src/UserTests.cs:line 42
at MyApp.Tests.Helpers.TestSetup.Run() in /src/TestSetup.cs:line 10
... 2 more
Filtered namespaces include xUnit, NUnit, MSTest, System.Reflection, System.Threading,
System.Runtime.CompilerServices, and async infrastructure (--- End of stack trace ...).
If all frames are framework-internal, the first raw frame is shown as a fallback.
To disable filtering and see the full raw stack trace:
dotnet test --logger "list;FilterStackTrace=false"
Configuration
| Setting | Default | Description |
|---|---|---|
Verbosity |
normal |
Output level: normal, minimal (failures only), or quiet (summary only) |
SuppressConsoleOutput |
true |
Suppress direct Console.Write output during test execution |
ShowTestOutput |
onfailure |
Show ITestOutputHelper output: onfailure, always, or never |
MaxStackTraceLines |
5 |
Max user-code stack trace lines per failure (framework frames are filtered first). 0 = hide, -1 = unlimited |
FilterStackTrace |
true |
Filter framework-internal lines from stack traces |
SlowThresholdMs |
2000 |
Duration in ms after which a test is highlighted in yellow with ⚠. 0 = disabled |
VerySlowThresholdMs |
10000 |
Duration in ms after which a test is highlighted in red with ⚠. 0 = disabled |
Note: CollapseTheories and ShowTestList are only configurable when using the xUnit adapter, which sets them as test properties.
CI Usage
This logger is designed for human-readable output. For machine-readable results (CI integrations, dashboards, etc.), combine it with a structured logger:
dotnet test --logger list --logger trx
Both loggers run in parallel — you get clean terminal output and a machine-readable file for your CI system.
Disabling the Logger
To temporarily disable the logger without removing it from your configuration, set the
TESTLOGGER_ENABLED environment variable to false:
TESTLOGGER_ENABLED=false dotnet test
When disabled, no output is produced and console suppression is skipped — your test run behaves as if the logger were not installed.
Requirements
- .NET 8.0+ (including .NET 9.0 and 10.0) or .NET Framework 4.7.2+
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Microsoft.TestPlatform.ObjectModel (>= 18.4.0)
-
net8.0
- Microsoft.TestPlatform.ObjectModel (>= 18.4.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Babelserver.DotNet.TestLogger:
| Package | Downloads |
|---|---|
|
Babelserver.DotNet.TestAdapter.xUnit
A quiet xUnit test adapter based on xunit.runner.visualstudio that suppresses console noise |
GitHub repositories
This package is not used by any popular GitHub repositories.