Get-MtHtmlReport
SYNOPSISโ
Generates a formatted html report using the MaesterResults object created by ConvertTo-MtMaesterResult
SYNTAXโ
Get-MtHtmlReport [-MaesterResults] <PSObject> [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTIONโ
The generated html is a single file that provides a visual representation of the test results with a summary view and click through of the details.
Supports both single-tenant results (from ConvertTo-MtMaesterResult) and multi-tenant results (from Merge-MtMaesterResult).
EXAMPLESโ
EXAMPLE 1โ
$pesterResults = Invoke-Pester -PassThru
$maesterResults = ConvertTo-MtMaesterResult $pesterResults
$output = Get-MtHtmlReport -MaesterResults $maesterResults
$output | Out-File -FilePath $out.OutputHtmlFile -Encoding UTF8
This example shows how to generate the html report and save it to a file by using Invoke-Pester
EXAMPLE 2โ
$maesterResults = Invoke-Maester -PassThru
$output = Get-MtHtmlReport -MaesterResults $maesterResults
$output | Out-File -FilePath $out.OutputHtmlFile -Encoding UTF8
This example shows how to generate the html report and save it to a file by using Invoke-Maester
EXAMPLE 3โ
$result1 = Invoke-Maester -PassThru
$result2 = Invoke-Maester -PassThru
$merged = Merge-MtMaesterResult -MaesterResults @($result1, $result2)
$output = Get-MtHtmlReport -MaesterResults $merged
$output | Out-File -FilePath "MultiTenantReport.html" -Encoding UTF8
This example shows how to generate a multi-tenant html report
PARAMETERSโ
-MaesterResultsโ
The Maester test results returned from Invoke-Pester -PassThru | ConvertTo-MtMaesterResult
or from Merge-MtMaesterResult for multi-tenant reports.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-ProgressActionโ
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParametersโ
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.