ConvertTo-Pester4Result
Contributions are welcome in Pester-repo.
SYNOPSIS
Converts a Pester 5 result-object to an Pester 4-compatible object
SYNTAX
ConvertTo-Pester4Result [-PesterResult] <Object>
DESCRIPTION
Pester 5 uses a new format for it's result-object compared to previous versions of Pester. This function is provided as a way to convert the result-object into an object using the previous format. This can be useful as a temporary measure to easier migrate to Pester 5 without having to redesign complex CI/CD-pipelines.
EXAMPLES
EXAMPLE 1
$pester5Result = Invoke-Pester -Passthru
$pester4Result = $pester5Result | ConvertTo-Pester4Result
This example runs Pester using the Passthru option to retrieve a result-object in the Pester 5 format and converts it to a new Pester 4-compatible result-object.
PARAMETERS
-PesterResult
Result object from a Pester 5-run. This can be retrieved using Invoke-Pester -Passthru or by using the Run.PassThru configuration-option.
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
System.Object
OUTPUTS
NOTES
RELATED LINKS
- https://pester.dev/docs/commands/ConvertTo-Pester4Result
- https://pester.dev/docs/commands/Invoke-Pester
VERSION
This page was generated using comment-based help in Pester 6.0.0.