trxlog2html 1.0.4

dotnet tool install --global trxlog2html --version 1.0.4
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local trxlog2html --version 1.0.4
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=trxlog2html&version=1.0.4
                    
nuke :add-package trxlog2html --version 1.0.4
                    

trxlog2html

Trxlog2html is the command line tool for converting the output result of VSTest log to html.

converting sample

The result of VSTest

test_explorer

The report html

test_html

Install

You can install this tool from NuGet.org.

.NET CLI(Global)

Install as global tool.

dotnet tool install --global trxlog2html --version 1.0.0

.NET CLI(Local)

Install as local tool

dotnet new tool-manifest
dotnet tool install --local trxlog2html --version 1.0.0

*) Difference between global tool and local tool

https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools

How to use

Use the following procedure.

  1. Run visual studio test and output a Visual Studio Test Results File (TRX).
  2. Convert the TRX to html file using the trxlog2html tool.

The details are explained below.

Run visual studio test and output TRX

To output TRX, you need to run Visual Studio tests from the command line using VSTest.Console.exe.

VSTest.Console.exe exists under the Visual Studio installation directory. Since it exists in a deep directory, it is recommended to create a batch like the one below.

@echo off
setlocal

REM edit VSTEST_DIR to suit your environment.
SET VSTEST_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\

REM edit TEST_DLL_PATH to your test project dll path.
SET TEST_DLL_PATH=.\bin\Debug\.netcoreapp,version=v5.0\UnitTestSampleTests.dll

"%VSTEST_DIR%vstest.console.exe" %TEST_DLL_PATH% /logger:trx;LogFileName=utest_result.xml

endlocal

*)See below for more information on VSTest.Console.exe.

https://github.com/MicrosoftDocs/visualstudio-docs/blob/main/docs/test/vstest-console-options.md

Convert the TRX to html file

Execute the following command from the command prompt.

dotnet run trxlog2html -i [input trx file path] -o [output html file path]

Customize output html format

You can use your own template to output an html file with the -t option.

dotnet run trxlog2html -i [input trx file path] -t [your_template_file] -o [output html file path]

The template is a Razor template format file (cshtml).

By default, the following built-in template is used. Please customize and use it.

https://github.com/HikosakaRyo/trxlog2html/blob/main/built_in_templates/jstest_like.cshtml

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.4 1,310 4/7/2025
1.0.3 311 4/7/2025 1.0.3 is deprecated because it has critical bugs.
1.0.2 706 6/6/2024
1.0.1 341 2/16/2024
1.0.0 1,076 1/16/2022

1.0.4: Support for newer frameworks (.NET 6.0, .NET 7.0, .NET 8.0, .NET 9.0)