PowerShell module with all kinds of miscellaneous goodies
Use this function to create a code coverage report using Pester 5 and ReportGenerator.
- PowerShell module Pester
- Daniel Palme's ReportGenerator
-
Download the latest release
-
Requires .NET Runtime
winget install Microsoft.DotNet.Runtime.9
-
After downloading the latest release of the ReportGenerator unzip the file. Depending on the version you downloaded you will get the following directory structure:
REPORTGENERATOR_5.4.3
├───net47
├───net8.0
└───net9.0
Create directory C:\ReportGenerator
and copy the content of any of the netxx directory (depending on the .Net Runtime version you have on your system).
Add C:\ReportGenerator
to environment variable Path
.
Example report
Code coverage summary:
Code coverage details:
This function creates or updates the directory structure specified in the JSON directory structure template file or object.
A template example is available here.