![]() |
VOOZH | about |
dotnet add package JunitXml.TestLogger --version 8.0.0
NuGet\Install-Package JunitXml.TestLogger -Version 8.0.0
<PackageReference Include="JunitXml.TestLogger" Version="8.0.0" />
<PackageVersion Include="JunitXml.TestLogger" Version="8.0.0" />Directory.Packages.props
<PackageReference Include="JunitXml.TestLogger" />Project file
paket add JunitXml.TestLogger --version 8.0.0
#r "nuget: JunitXml.TestLogger, 8.0.0"
#:package JunitXml.TestLogger@8.0.0
#addin nuget:?package=JunitXml.TestLogger&version=8.0.0Install as a Cake Addin
#tool nuget:?package=JunitXml.TestLogger&version=8.0.0Install as a Cake Tool
JUnit xml report extension for MTP v2 and Visual Studio Test Platform. Please use v7.x for MTP v1 runners.
| Logger | Stable Package | Pre-release Package |
|---|---|---|
| JUnit | 👁 NuGet |
👁 MyGet Pre Release |
If you're looking for Nunit or Xunit loggers, please see https://github.com/spekt/testlogger.
The JUnit Test Logger generates xml reports in the Ant Junit Format, which the JUnit 5 repository refers to as the de-facto standard. While the generated xml complies with that schema, it does not contain values in every case. For example, the logger currently does not log any properties. Please refer to a sample file to see an example. If you find that the format is missing data required by your CI/CD system, please open an issue or PR.
To use the logger, follow these steps:
Add a reference to the JUnit Logger nuget package in test project
Use the following command line in tests
> dotnet test --logger:junit
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:"junit;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.
The logger also supports Microsoft.Testing.Platform (MTP) with the following command line options:
> dotnet test -- --report-spekt-junit --report-spekt-junit-filename test-result.xml
The --report-spekt-junit option can also accept configuration arguments:
> dotnet test -- --report-spekt-junit "key1=value1;key2=value2"
There are several options to customize how the junit xml is populated. These options exist to provide additional control over the xml file so that the logged test results can be optimized for different CI/CD systems.
Platform Specific Recommendations:
After the logger name, command line arguments are provided as key/value pairs with the following general format. Note the quotes are required, and key names are case-sensitive.
> dotnet test --test-adapter-path:. --logger:"junit;key1=value1;key2=value2"
| Option name | Purpose | Documentation |
|---|---|---|
| LogFileName* | Customize test result file name with {assembly} or {framework} tokens |
See config-wiki |
| LogFilePath* | Test result file full path | See config-wiki |
| UseRelativeAttachmentPath* | Use attachment paths relative to test result file. Boolean. Default: false | See config-wiki |
| MethodFormat | Alter test case name | See below |
| FailureBodyFormat | Control test result output | See below |
| StoreConsoleOutput | Show or hide console output in the test report. Boolean. Default: true | See below |
*All common options to the logger are documented in the wiki. E.g.
token expansion for {assembly} or {framework} in result file. If you are writing multiple
files to the same directory or testing multiple frameworks, these options can prevent
test logs from over-writing each other.
This option alters the testcase name attribute. By default, this contains only the method. Class, will add the class to the name. Full, will add the assembly/namespace/class to the method.
We recommend this option for users.
When set to default, the body of a failure element will contain only the exception which is captured by vstest. Verbose will prepend the body with 'Expected X, Actual Y' similar to how it is displayed in the standard test output. 'Expected X, Actual Y' are normally only contained in the failure message. Additionally, Verbose will include standard output from the test in the failure message.
We recommend this option for and users.
You can use StoreConsoleOutput option to disable any system-out and system-err logs in either testsuite or testcase elements or both. By default, all console outputs are captured. Example usage:
dotnet test --logger:"junit;StoreConsoleOutput=false"
NOTE: test attachments are always emitted in system-out for tests cases even when above option is false or testsuite.
v5.x and later behavior
In v5.x and later, system-out and system-err logs are reported at a per testcase element in the report. Because each test
adapter determines to also emit the console output and errors at test suite level, there may be some duplication for the messages.
v4.x and earlier behavior
Prior to v5.x, console stdout and stderr was reported only in the system-out and system-err elements at testsuite level. This
would concatenate messages from all test results and information messages from adapter.
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package has no dependencies.
Showing the top 5 NuGet packages that depend on JunitXml.TestLogger:
| Package | Downloads |
|---|---|
|
M5x.Testing
Macula Base Testing Library |
|
|
Tenduke.Core.Tests
Tests for the Tenduke.Core library. Includes utilities used in testing of the 10Duke Enterprise and 10Duke Scale SDKs. |
|
|
Galen.SDK
SDK for Galen Cloud |
|
|
Awesome.Cache
Add-on over FileCache. With built-in Newtonsoft.Json serialization and ready-made abstraction for DI. |
|
|
STrain.Extensions.Testing
Package Description |
Showing the top 20 popular GitHub repositories that depend on JunitXml.TestLogger:
| Repository | Stars |
|---|---|
|
App-vNext/Polly
Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.
|
|
|
MudBlazor/MudBlazor
Blazor Component Library based on Material Design principles. Do more with Blazor, utilizing CSS and keeping JavaScript to a bare minimum.
|
|
|
dorssel/usbipd-win
Windows software for sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2.
|
|
|
domaindrivendev/Swashbuckle.AspNetCore
Swagger tools for documenting API's built on ASP.NET Core
|
|
|
riok/mapperly
A .NET source generator for generating object mappings. No runtime reflection.
|
|
|
ravendb/ravendb
ACID Document Database
|
|
|
open-telemetry/opentelemetry-dotnet
The OpenTelemetry .NET Client
|
|
|
elastic/elasticsearch-net
This strongly-typed, client library enables working with Elasticsearch. It is the official client maintained and supported by Elastic.
|
|
|
mongodb/mongo-csharp-driver
The Official C# .NET Driver for MongoDB
|
|
|
GitTools/GitVersion
From git log to SemVer in no time
|
|
|
TASEmulators/BizHawk
BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
|
|
|
ProtonVPN/win-app
Official ProtonVPN Windows app
|
|
|
velopack/velopack
Installer and automatic update framework for cross-platform desktop applications
|
|
|
dotpcap/sharppcap
Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets
|
|
|
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
|
|
|
BcryptNet/bcrypt.net
BCrypt.Net - Bringing updates to the original bcrypt package
|
|
|
GoogleCloudPlatform/dotnet-docs-samples
.NET code samples used on https://cloud.google.com
|
|
|
Dotnet-Boxed/Framework
.NET Core Extensions and Helper NuGet packages.
|
|
|
RehanSaeed/Schema.NET
Schema.org objects turned into strongly typed C# POCO classes for use in .NET. All classes can be serialized into JSON/JSON-LD and XML, typically used to represent structured data in the head section of html page.
|
|
|
open-telemetry/opentelemetry-dotnet-contrib
This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.0 | 5,258,232 | 1/9/2026 |
| 7.1.0 | 1,165,529 | 12/13/2025 |
| 7.0.2 | 2,924,015 | 10/8/2025 |
| 7.0.1 | 118,101 | 10/4/2025 |
| 6.1.0 | 9,566,686 | 3/15/2025 |
| 6.0.0 | 1,622,006 | 2/14/2025 |
| 5.0.0 | 4,412,292 | 12/19/2024 |
| 4.1.0 | 5,730,754 | 10/12/2024 |
| 4.0.254 | 5,574,930 | 7/28/2024 |
| 3.1.12 | 10,616,373 | 2/10/2024 |
| 3.0.134 | 10,020,434 | 7/12/2023 |
| 3.0.124 | 7,263,914 | 1/30/2023 |
| 3.0.114 | 11,179,448 | 5/18/2022 |
| 3.0.110 | 8,976,803 | 12/4/2021 |
| 3.0.98 | 4,869,895 | 5/27/2021 |
| 3.0.87 | 977,924 | 4/8/2021 |
| 2.1.81 | 2,883,695 | 1/6/2021 |
| 2.1.78 | 1,032,385 | 9/27/2020 |
| 2.1.32 | 1,631,580 | 4/20/2020 |