Compare-MtTestResult
SYNOPSIS
Section titled “SYNOPSIS”Compares Maester test result JSON files
SYNTAX
Section titled “SYNTAX”Directory
Section titled “Directory”Compare-MtTestResult [-BaseDir] <Object> [-ProgressAction <ActionPreference>] [<CommonParameters>]Compare-MtTestResult [-PriorTest] <Object> [-NewTest] <Object> [-ProgressAction <ActionPreference>] [<CommonParameters>]DESCRIPTION
Section titled “DESCRIPTION”Will compare the most recent two test result JSON outputs from prior Invoke-Maester runs, or will accept any two test result JSON files and provide the tests that have changed.
EXAMPLES
Section titled “EXAMPLES”EXAMPLE 1
Section titled “EXAMPLE 1”Compare-MtTestResult -BaseDir .\test-resultsEXAMPLE 2
Section titled “EXAMPLE 2”$tests = @{ NewTest = (Get-Content .\test-results\TestResults-2024-05-21-182925.json | ConvertFrom-Json)PriorTest = (Get-Content .\test-results\TestResults-2024-05-20-182925.json | ConvertFrom-Json)}Compare-MtTestResult @testsPARAMETERS
Section titled “PARAMETERS”-BaseDir
Section titled “-BaseDir”Path to folder where test results are located. The two newest results will be compared.
Type: ObjectParameter Sets: DirectoryAliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-PriorTest
Section titled “-PriorTest”Path to the previous test result JSON-file to be used as a reference.
Type: ObjectParameter Sets: FilesAliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-NewTest
Section titled “-NewTest”Path to the newer test result JSON-file to be used as the current result.
Type: ObjectParameter Sets: FilesAliases:
Required: TruePosition: 2Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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.