ConvertTo-JUnitReport
#
SYNOPSISConverts a Pester result-object to an JUnit-compatible XML report
#
SYNTAX#
DESCRIPTIONPester can generate a result-object containing information about all tests that are processed in a run. This objects can then be converted to an NUnit-compatible XML-report using this function. The report is generated using the JUnit 4-schema.
The function can convert to both XML-object or a string containing the XML. This can be useful for further processing or publishing of test results, e.g. as part of a CI/CD pipeline.
#
EXAMPLES#
EXAMPLE 1This example runs Pester using the Passthru option to retrieve the result-object and converts it to an JUnit 4-compatible XML-report. The report is returned as an XML-object.
#
EXAMPLE 2This example runs Pester using the Passthru option to retrieve the result-object and converts it to an JUnit 4-compatible XML-report. The returned object is a string.
#
PARAMETERS#
-ResultResult object from a Pester-run. This can be retrieved using Invoke-Pester -Passthru or by using the Run.PassThru configuration-option.
#
-AsStringReturns the XML-report as a string.
#
CommonParametersThis 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#
RELATED LINKShttps://pester.dev/docs/commands/ConvertTo-JUnitReport
https://pester.dev/docs/commands/Invoke-Pester
#
EDIT THIS PAGEThis page was auto-generated using the comment based help in Pester 5.1.1. To edit the content of this page, change the corresponding help in the pester/Pester repository. See our contribution guide for more information.