Babelserver.DotNet.TestLogger 4.0.2

dotnet add package Babelserver.DotNet.TestLogger --version 4.0.2
                    
NuGet\Install-Package Babelserver.DotNet.TestLogger -Version 4.0.2
                    
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="Babelserver.DotNet.TestLogger" Version="4.0.2">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Babelserver.DotNet.TestLogger" Version="4.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Babelserver.DotNet.TestLogger">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 Babelserver.DotNet.TestLogger --version 4.0.2
                    
#r "nuget: Babelserver.DotNet.TestLogger, 4.0.2"
                    
#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 Babelserver.DotNet.TestLogger@4.0.2
                    
#: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=Babelserver.DotNet.TestLogger&version=4.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Babelserver.DotNet.TestLogger&version=4.0.2
                    
Install as a Cake Tool

Babelserver.DotNet.TestLogger

NuGet Downloads Pipeline Coverage .NET License: MIT xUnit?

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="4.0.2" />

Then run:

dotnet test --logger list

Results are printed class by class as they arrive. NUnit and MSTest give the logger no way of knowing how many tests a class has, so a class is taken to be finished when a result from another class shows up. When the framework runs classes in parallel and a class comes back, its header is repeated with (continued), so no result is ever listed under the wrong class. Showing failing classes last needs those counts and is therefore only available with the xUnit adapter.

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...

Rows that carry a Label on their data attribute (xUnit v3) are grouped like any other row, and a failing one is listed by its label instead of its arguments:

  ❌ MyTheoryTest (1/3 runs failed) (4ms)
    ► MyTheoryTest [mismatch]
    Error: Assert.Equal() Failure...

With the xUnit adapter, rows are grouped by the test method the adapter reports (a test case is a row when its method has parameters or when several test cases share its method), so display names of any shape work, and a fact keeps its display name even if it contains parentheses, including the Method_001(...) form produced by [Theory(IncludeTestCaseIndex = true)]. The adapter also reports how many rows each theory has, so the grouped line is printed the moment the last row arrives, even when rows of different theories interleave under xUnit's parallelMode: "all". Without that information, groups are printed when their class is complete. With other adapters the logger groups on the Method(arguments) display name shape.

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
Setup 1.1s · Running 3.4s · Teardown 0.2s · Total 4.7s
────────────────────────────────────────────────────────────

minimal when all pass, and quiet in both cases:

✅ Tests: 42, Passed: 42, Failed: 0, Skipped: 0
Setup 1.1s · Running 3.4s · Teardown 0.2s · Total 4.7s

Timing Breakdown

The summary ends with a wall-clock breakdown of the run:

────────────────────────────────────────────────────────────
✅ Tests: 7, Passed: 7, Failed: 0, Skipped: 0
Setup 14.2s · Running 7.8s · Teardown 2.7s · Total 24.7s
────────────────────────────────────────────────────────────
  • Setup — everything before the first test started: test host startup, discovery, and one-time fixture initialization (for example Testcontainers/database startup and seeding).
  • Running — the window from the first test starting to the last test finishing.
  • Teardown — the time after the last test finished until the run completes, typically fixture/container disposal.

This surfaces time that the per-test durations leave out, since those only measure the test body. Test start and end are taken from the timestamps the adapter puts on each result, not from when the result reached the logger, so the phases are not skewed by VSTest delivering results in batches. The three phases sum to the total, and stay meaningful when tests run in parallel. The line is shown at all verbosity levels.

Per-class fixture timing (xUnit adapter, xUnit v3 4.0+)

When the xUnit adapter is used with a test project on xUnit v3 4.0 or later, each class whose fixtures took noticeable time gets a line of its own under its tests:

Running MyProject.Tests.UserServiceTests
  ✅ CreateUser_WithValidData_ReturnsUser (42ms)
  ✅ CreateUser_WithInvalidEmail_ThrowsException (8ms)
  Fixtures: setup 12.1s ⚠ · teardown 2.3s ⚠

setup is the time between the class (and its collection) starting and its first test starting, typically class or collection fixture construction such as a Testcontainers start. teardown is the time between the last test finishing and the class and collection finishing, typically fixture disposal. Collection fixture time is attributed to the class that triggered it, which with xUnit's default one-collection-per-class layout is simply the class. Each figure is coloured like a slow test, with its own ⚠, when it crosses SlowThresholdMs or VerySlowThresholdMs. The line is hidden below FixtureTimingThresholdMs (default 500 ms, so that ordinary class construction and JIT warm-up do not produce lines; lower it to see smaller fixtures). It is only printed at normal verbosity.

Colours

Output is coloured with ANSI codes. Set the NO_COLOR environment variable, or --logger "list;Color=never", to turn them off; Color=always forces them on. On Windows the legacy console host does not interpret the codes, so they are off there unless forced; Windows Terminal and VS Code are fine.

Console noise

This logger does not touch what your test code writes to the console; it runs in vstest.console, a different process from the tests. What keeps test host chatter and VSTest's duplicate failure dumps out of the output is the VSTestVerbosity=quiet default that the package's MSBuild props set. With the xUnit adapter, see its README for the Babelserver.SuppressConsoleOutput setting.

Test Output (ITestOutputHelper, stdout and stderr)

When tests fail, what they wrote is shown automatically, dimmed and indented, before the error message and stack trace. That is output written via ITestOutputHelper (xUnit), and whatever the test framework's adapter captured from stdout and stderr:

  ❌ CreateUser_WhenDuplicate_Throws (12ms)
      Debug: created user with id 42
      Debug: attempting to create duplicate...
    Error: Expected DuplicateException but got none

xUnit captures everything as a single stream. NUnit and MSTest report stdout and stderr separately, and stderr is then shown after stdout, under a stderr: label. Adapters deliver each stream as one block, so the order in which the test wrote stdout and stderr lines relative to each other is not available:

  ❌ ImportOrders (34ms)
      step 1
      step 2
      stderr:
      WARN retrying connection
    Error: Assert.AreEqual failed. Expected:<3>. Actual:<2>.

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)
ShowTestOutput onfailure Show the test's own output (ITestOutputHelper, stdout, stderr): 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
Color auto ANSI colours: auto (on, except when NO_COLOR is set or on a legacy Windows console), always, or never
FixtureTimingThresholdMs 500 Combined fixture setup and teardown time in ms from which the per-class Fixtures: line is shown. 0 = always, negative = never

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.

Duplicate failure output from dotnet test

dotnet test can render failed tests a second time, on top of this logger's own summary, from two different places in the .NET SDK (not from this package):

  • The VSTest console logger prints an unfiltered Failed … / Error Message: / Stack Trace: block. This package already silences it by setting VSTestVerbosity to quiet, so you should not see it.
  • The MSBuild terminal logger (on by default in an interactive terminal) renders failures at the very end as MSBuild errors (error TESTERROR:). On a large run this can push the summary off the screen.

The terminal logger is engine-level and cannot be turned off from a package, so to drop its block turn it off for the run:

dotnet test --tl:off

With both the console logger quieted (automatic) and the terminal logger off, this logger's summary is the only test output. For a permanent setup without the flag, set the environment variable instead, e.g. in your shell profile or CI:

export MSBUILDTERMINALLOGGER=off

The terminal logger is also off automatically when output is redirected (most CI logs), so the block is really only an interactive-terminal concern. Note --tl:off also drops the terminal logger's per-project build progress lines.

Do not use VsTestUseMSBuildOutput=false for this: with the terminal logger on it suppresses the duplicate block but also hides this logger's own output, leaving you with no test results at all.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.
  • net8.0

    • No dependencies.

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.

Version Downloads Last Updated
4.0.2 807 10/9/2026
4.0.1 16,694 9/3/2026
4.0.0 158 9/3/2026
3.3.0 12,646 6/13/2026
3.2.0 528 4/12/2026
3.1.0 154 3/31/2026
3.0.0 1,415 2/17/2026
2.1.0 168 2/15/2026
2.0.0 763 1/29/2026
1.0.2 175 1/29/2026
1.0.1 171 1/26/2026
1.0.0 309 1/24/2026