mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Added Pivoting Pester Test Results
This commit is contained in:
26
Examples/InteractWithOtherModules/Pester/Analyze_that.ps1
Normal file
26
Examples/InteractWithOtherModules/Pester/Analyze_that.ps1
Normal file
@@ -0,0 +1,26 @@
|
||||
param(
|
||||
$PesterTestsPath = "$PSScriptRoot\..\..\..\__tests__\"
|
||||
)
|
||||
|
||||
$xlfile = "$env:Temp\testResults.xlsx"
|
||||
Remove-Item $xlfile -ErrorAction SilentlyContinue
|
||||
|
||||
$xlparams = @{
|
||||
Path = $xlfile
|
||||
InputObject = (Invoke-Pester -Script $PesterTestsPath -PassThru).TestResult | Sort-Object describe
|
||||
WorksheetName = 'FullResults'
|
||||
|
||||
IncludePivotTable = $true
|
||||
PivotRows = 'Describe'
|
||||
PivotColumns = 'Passed'
|
||||
PivotData = @{'Passed' = 'Count' }
|
||||
|
||||
IncludePivotChart = $true
|
||||
ChartType = 'BarClustered'
|
||||
|
||||
AutoSize = $true
|
||||
AutoFilter = $true
|
||||
Activate = $true
|
||||
}
|
||||
|
||||
Export-Excel -Show @xlparams
|
||||
Reference in New Issue
Block a user