https://github.com/alt3/convertto-modulebuilderjacoco
PowerShell module for converting Pester produced Jacoco code coverage files to ModuleBuilder compatible format.
https://github.com/alt3/convertto-modulebuilderjacoco
codecov codecoverage jacoco pester powershell powershell-module
Last synced: about 1 year ago
JSON representation
PowerShell module for converting Pester produced Jacoco code coverage files to ModuleBuilder compatible format.
- Host: GitHub
- URL: https://github.com/alt3/convertto-modulebuilderjacoco
- Owner: alt3
- License: mit
- Created: 2022-08-02T12:49:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-12T09:37:52.000Z (over 3 years ago)
- Last Synced: 2025-01-16T22:23:49.066Z (about 1 year ago)
- Topics: codecov, codecoverage, jacoco, pester, powershell, powershell-module
- Language: PowerShell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ConvertTo-ModuleBuilderJacoco
PowerShell module for converting Pester produced Jacoco code coverage files to
[ModuleBuilder](https://github.com/PoshCode/ModuleBuilder)
compatible format.
### Installation
```powershell
Install-Module -Name Alt3.ConvertTo-ModuleBuilderJacoco
```
### Usage
```powershell
ConvertTo-ModuleBuilderJacoco -ModulePath ModuleBuilderModule.psm1 -InFile PesterCoverageResults.xml -OutFile ConvertedCoverageResults.xml
```
### HTML reports
1. Install [danielpalme/ReportGenerator](https://github.com/danielpalme/ReportGenerator)
2. Run:
```powershell
ReportGenerator.exe -reports:ConvertedCoverageResults.xml -targetdir:.\Dev\reports -reporttypes:'Latex;Html' -sourcedirs:path-to-your-module-source-files
```
3. Open `.\Dev\reports\index.html`
### Good to know
- Every covered ModuleBuilder source subfolder gets a correlating Jacoco `package` XML node
- Every covered ModuleBuilder source file gets a correlating `class`, `method` and `sourcefile` XML node
- Jacoco `counter` nodes are not recreated as they are not required for ReportGenerator, CodeCov, etc.