Skip to main content

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.

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

PARAMETERS

-MaesterResults

The Maester test results returned from Invoke-Pester -PassThru | ConvertTo-MtMaesterResult

Type: PSObject
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
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.

INPUTS

OUTPUTS

NOTES

https://maester.dev/docs/commands/Get-MtHtmlReport