NunitXml.TestLogger 7.0.2

NUnit Test Logger

NUnit xml report extension for Visual Studio Test Platform.

NuGet Downloads

Packages

Logger Stable Package Pre-release Package
NUnit NuGet MyGet Pre Release

If you're looking for xunit or junit, please see https://github.com/spekt/testlogger.

Usage

NUnit logger can generate xml reports in the NUnit v3 format.

  1. Add a reference to the NUnit Logger NuGet package in test project
  2. Use the following command line in tests
> dotnet test --logger:nunit
  1. Test results are generated in the TestResults directory relative to the test.csproj

A path for the report file can be specified as follows:

> dotnet test --logger:"nunit;LogFilePath=test-result.xml"

test-result.xml will be generated in the same directory as test.csproj.

Note: the arguments to --logger should be in quotes since ; is treated as a command delimiter in shell.

Microsoft.Testing.Platform (MTP) Support

The logger also supports Microsoft.Testing.Platform (MTP) with the following command line options:

> dotnet test -- --report-spekt-nunit --report-spekt-nunit-filename test-result.xml

The --report-spekt-nunit option can also accept configuration arguments:

> dotnet test -- --report-spekt-nunit "key1=value1;key2=value2"

Configuration

Supported configuration options include:

  • LogFilePath: Sets the output file path (supports token expansion with {assembly} and {framework})

All common options to the logger is documented in the wiki. E.g. token expansion for {assembly} or {framework} in result file.

NUnit test framework settings

  • If your scenario requires test case properties like Description in the xml, please enable internal properties for the nunit adapter:

dotnet test --logger:nunit -- NUnit.ShowInternalProperties=true

  • NUnit test adapter also provides a mechanism to emit test result xml from the NUnit engine. You may use following commandline for the same:

dotnet test --logger:nunit -- NUnit.TestOutputXml=<foldername relative to test binary directory>

License

MIT

No packages depend on NunitXml.TestLogger.

This package has no dependencies.

Version Downloads Last updated
7.0.2 1 10/10/2025
7.0.1 3 10/08/2025
6.1.0 12 04/12/2025
6.0.0 13 02/28/2025
5.0.0 14 12/23/2024
4.1.0 18 11/30/2024
4.0.254 15 10/09/2024
3.1.20 18 10/09/2024
3.1.15 16 10/09/2024
3.0.131 15 08/13/2024
3.0.127 14 10/09/2024
3.0.117 17 03/06/2023
3.0.107 15 10/09/2024
3.0.97 16 11/30/2024
3.0.91 15 10/09/2024
2.1.80 14 10/09/2024
2.1.62 15 10/09/2024
2.1.41 18 10/09/2024
2.1.36 16 10/09/2024
2.1.17 17 10/09/2024
1.1.0 15 10/09/2024
1.0.0 16 10/09/2024