Due to GitHub being integrated into Microsoft’s CoreAI division and effectivelly becoming Microsoft’s data source for training Microsoft’s LLMs without attributing or compensating open source authors and projects, this repository is now locked until it’s transferred to another platform.
JaCoCo (Java Code Coverage) XML to HTML converter written in PowerShell.
JaCoCo is a popular code coverage format used by several languages and tools, including PowerShell’s Pester testing framework.
The best thing about this tool is - it’s all PowerShell. You don’t need to have Java or any other tool installed in order to generate an HTML report.
-
Pure PowerShell without dependencies
-
Code coverage statistics per group, package and source file
-
Source code coverage with colored lines, automatic source code language detection and syntax highlighting
-
All supported statistics are covered: instructions, branches, lines, complexity, methods and classes
-
Dark and light themes
-
Support for custom themes (Bootstrap or your own custom CSS)
-
Simple, but rich, well documented configuration (config file) with minimum mandatory fields - exactly 3: XML file, source code directory and HTML destination directory. The rest are pure customization options.
-
Easy integration with Pester
-
Mozilla Public License 2.0 (free and open source)
-
Microsoft PowerShell 7 (Installation instructions)
-
For running Pester tests see the Testing guide
Clone the repository:
git clone https://github.com/constup/JaCoCo-XML-to-HTML-PowerShell .
or download and unpack a release from Releases page
In order to use this tool, you will need a configuration file. A commented-out configuration file
(config.ps1.dist) is provided, so you can just copy it to your project and run JaCoCo-XML-To-HTML.
Just remember to remove the .dist
extension.
Mandatory configuration options are:
-
xml_file
: the coverage report XML file; -
destination_directory
: where you want to save the HTML report. This directory must be empty. The directory will be created if it does not exist; -
sources_directory
: root directory where your project’s source code is (usuallysrc/
directory in your project)
The rest of the configuration options are optional. Their description and documentation is available on the Configuration page.
Once you have a configuration file with mandatory properties filled, everything is done by calling one command:
pwsh .\constup-jacoco-xml-to-html.ps1 --config /path/to/your/configuration/file
By default, JaCoCo XML to HTML will create an HTML with a light theme. To generate a report with a dark theme, set the theme in your configuration file:
'theme' = 'dark';
More theme and customization options are available on the Configuration page.
The following documentation is also available:
-
Configuration - Additional configuration, themes and customization options
-
Test Tools Integration - How to integrate this tool with testing tools
-
Testing - Unit testing with Pester
This project uses and is bundled with the following 3rd party software:
-
Bootstrap v5.3 - Copyright (c) 2011-2025 The Bootstrap Authors
-
MIT License (official repository)
-
MIT License (bundled with this project)
-
-
HighlightJS v11.11 - Copyright (c) 2006, Ivan Sagalaev
-
BSD 3-Clause License (official repository)
-
BSD 3-Clause License (bundled with this project)
-
-
HighlightJS Line Numbers plugin v2.9 - Copyright (c) 2017 Yauheni Pakala
-
MIT License (official repository)
-
MIT License (bundled with this project)
-
Mozilla Public License 2.0 (also available on Mozilla’s website at: MPL 2.0)