PrettyTRX 1.0.9
dotnet tool install --global PrettyTRX --version 1.0.9
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local PrettyTRX --version 1.0.9
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=PrettyTRX&version=1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package PrettyTRX --version 1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PrettyTRX
A beautiful command line tool for generating HTML reports from TRX (Visual Studio Test Results) files.
Features
- 🔍 Recursive Scanning: Automatically finds all TRX files in a directory and its subdirectories
- 📊 Assembly Grouping: Groups test results by assembly name for better organization
- 🎨 Beautiful UI: Modern, responsive HTML reports with collapsible sections
- 📈 Summary Statistics: Quick overview of total, passed, failed, and skipped tests
- 🚀 Self-Contained: All CSS and JavaScript embedded in the HTML file
- ⚡ Fast: Efficient parsing and generation of reports
- 🔧 Easy Installation: Install as a global .NET tool
Installation
From NuGet (Recommended)
dotnet tool install --global PrettyTRX
From Source
git clone <repository-url>
cd PrettyTRX
dotnet pack PrettyTRX.Console
dotnet tool install --global --add-source ./PrettyTRX.Console/bin/Release PrettyTRX
Usage
Basic Usage
prettytrx --path /path/to/test/results
Specify Output Location
prettytrx --path /path/to/test/results --output /path/to/report.html
Command Line Options
-p, --path(Required): Root folder path to scan for TRX files-o, --output(Optional): Output path for the HTML report (defaults totest-report.htmlin the scanned folder)--help: Show help and usage information--version: Show version information
Example
# Scan current directory and subdirectories for TRX files
prettytrx --path .
# Scan a specific directory and save report to a custom location
prettytrx --path ./TestResults --output ./reports/test-report.html
Sample Output
The generated HTML report includes:
- Summary Dashboard: Total, passed, failed, and skipped test counts
- Assembly Sections: Collapsible sections grouped by test assembly
- Test Details: Individual test results with status, duration, and error details
- Error Information: Full error messages and stack traces for failed tests
- Modern UI: Clean, professional styling with responsive design
Report Features
- Interactive: Click on assembly headers to expand/collapse sections
- Color-Coded: Visual indicators for test status (green=passed, red=failed, orange=skipped)
- Detailed Errors: Full error messages and stack traces displayed for failed tests
- Duration Display: Test execution times shown for performance analysis
- Self-Contained: No external dependencies - can be opened by double-clicking
Technical Details
- Built with .NET 9.0
- Uses System.CommandLine for argument parsing
- Processes standard TRX XML format
- Generates responsive HTML with embedded CSS and JavaScript
- Cross-platform compatible (Windows, macOS, Linux)
CI/CD and Releases
This project uses GitHub Actions for continuous integration and deployment:
Automated Workflows
Build and Release (
.github/workflows/build-and-release.yml): Triggers on pushes to main branch- Builds the project with GitVersion for automatic versioning
- Runs all unit tests with coverage collection
- Publishes NuGet package to GitHub Packages
- Creates GitHub releases with auto-generated release notes
PR Build (
.github/workflows/pr-build.yml): Triggers on pull requests- Validates builds and tests without publishing
- Comments on PRs with build status and version information
- Validates package contents and structure
Security and Dependencies (
.github/workflows/security.yml): Regular security scans- CodeQL analysis for security vulnerabilities
- Dependency vulnerability scanning
- Checks for outdated and deprecated packages
Versioning Strategy
The project uses GitVersion for semantic versioning:
- Main branch: Patch increment (1.0.0 → 1.0.1)
- Develop branch: Minor increment with alpha pre-release (1.1.0-alpha.1)
- Feature branches: Feature pre-release (1.0.1-feature.branch-name.1)
- Hotfix branches: Patch increment with beta pre-release (1.0.1-beta.1)
Package Distribution
Packages are automatically published to:
- GitHub Packages: For internal and development use
- NuGet.org: For public releases (manual process)
Installation from GitHub Packages
# Add GitHub Packages as a source
dotnet nuget add source --username YOUR_USERNAME --password YOUR_PAT --store-password-in-clear-text --name github "https://nuget.pkg.github.com/chrissbarnard/index.json"
# Install the tool
dotnet tool install --global --add-source github PrettyTRX
Development Setup
Prerequisites
- .NET 9.0 SDK
- Git
Building Locally
# Restore dependencies
dotnet restore
# Build the project
dotnet build --configuration Release
# Run tests
dotnet test --configuration Release
# Pack as tool
dotnet pack --configuration Release
Testing Locally
# Install locally for testing
dotnet tool install --global --add-source ./PrettyTRX.Console/bin/Release PrettyTRX
# Test the tool
prettytrx --path ./sample-data
# Uninstall when done testing
dotnet tool uninstall --global PrettyTRX
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Development Guidelines
- Follow the coding standards defined in
.editorconfig - Ensure all tests pass before submitting PR
- Update documentation for new features
- Follow conventional commit message format for better release notes
License
MIT License - see LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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.