JunitXml.TestLogger 4.0.254

dotnet add package JunitXml.TestLogger --version 4.0.254                
NuGet\Install-Package JunitXml.TestLogger -Version 4.0.254                
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="JunitXml.TestLogger" Version="4.0.254" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JunitXml.TestLogger --version 4.0.254                
#r "nuget: JunitXml.TestLogger, 4.0.254"                
#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.
// Install JunitXml.TestLogger as a Cake Addin
#addin nuget:?package=JunitXml.TestLogger&version=4.0.254

// Install JunitXml.TestLogger as a Cake Tool
#tool nuget:?package=JunitXml.TestLogger&version=4.0.254                

JUnit Test Logger

JUnit xml report extension for Visual Studio Test Platform.

NuGet Downloads

Packages

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.

Usage

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:

  1. Add a reference to the JUnit Logger nuget package in test project

  2. Use the following command line in tests

    > dotnet test --logger:junit
    
  3. 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.

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.

Customizing Junit XML Contents

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"
MethodFormat

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

Allowed Values
  • MethodFormat=Default
  • MethodFormat=Class
  • MethodFormat=Full
FailureBodyFormat

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 GitLab and CircleCI users.

Allowed Values
  • FailureBodyFormat=Default
  • FailureBodyFormat=Verbose

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.5 is compatible.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on JunitXml.TestLogger:

Package Downloads
M5x.Testing

Macula Base Testing Library

Galen.SDK

SDK for Galen Cloud

markdavison.common.test

Common test utilities

Awesome.Cache

Add-on over FileCache. With built-in Newtonsoft.Json serialization and ready-made abstraction for DI.

STrain.Extensions.Testing

Package Description

GitHub repositories (29)

Showing the top 5 popular GitHub repositories that depend on JunitXml.TestLogger:

Repository Stars
icsharpcode/ILSpy
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
elastic/elasticsearch-net
This strongly-typed, client library enables working with Elasticsearch. It is the official client maintained and supported by Elastic.
ravendb/ravendb
ACID Document Database
mongodb/mongo-csharp-driver
The Official C# .NET Driver for MongoDB
GitTools/GitVersion
From git log to SemVer in no time
Version Downloads Last updated
4.0.254 342,790 7/28/2024
3.1.12 3,665,609 2/10/2024
3.0.134 5,174,570 7/12/2023
3.0.124 4,908,650 1/30/2023
3.0.114 8,616,958 5/18/2022
3.0.110 7,866,317 12/4/2021
3.0.98 4,175,472 5/27/2021
3.0.87 806,036 4/8/2021
2.1.81 2,165,033 1/6/2021
2.1.78 944,799 9/27/2020
2.1.32 1,414,143 4/20/2020
2.1.15 635,165 10/2/2019
2.1.10 48,428 9/26/2019