Evotec

Project

PSPublishModule

PSPublishModule is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 43
Forks 13
Open issues 1
PowerShell Gallery downloads 13,876
Release v3.0.3
Language: C# Updated: 2026-04-14

API Reference

Cmdlet

Get-ModuleTestFailures

Namespace PSPublishModule
Inputs
System.Object
Outputs
System.Object

Analyzes and summarizes failed Pester tests from either a Pester results object or an NUnit XML result file.

Remarks

This cmdlet is designed to make CI output and local troubleshooting easier by summarizing failures from: Use -OutputFormat to control whether the cmdlet writes a concise host summary, detailed messages, or emits JSON to the pipeline.

Examples

Authored help example

Analyze test failures from the default results location

PS>


Get-ModuleTestFailures
        

Searches for TestResults.xml under the project and prints a detailed failure report.

Analyze failures from a specific NUnit XML file

PS>


Get-ModuleTestFailures -Path 'Tests\TestResults.xml' -OutputFormat Summary
        

Writes a compact summary that is suitable for CI logs.

Pipe results from Invoke-ModuleTestSuite

PS>


Invoke-ModuleTestSuite -ProjectPath 'C:\Git\MyModule' | Get-ModuleTestFailures -OutputFormat Detailed -PassThru
        

Uses the in-memory results and returns the analysis object for further processing.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Get-ModuleTestFailures [-OutputFormat <Summary|Detailed|Json>] [-PassThru] [-Path <String>] [-ProjectPath <String>] [-ShowSuccessful] [<CommonParameters>]
#
Parameter set: Path

Parameters

OutputFormat ModuleTestFailureOutputFormat optionalposition: namedpipeline: Falsevalues: 3
Format for displaying test failures.
Possible values: Summary, Detailed, Json
PassThru SwitchParameter optionalposition: namedpipeline: False
Return the failure analysis object for further processing.
Path String optionalposition: namedpipeline: False
Path to the NUnit XML test results file. If not specified, searches for TestResults.xml under ProjectPath.
ProjectPath String optionalposition: namedpipeline: False
Path to the project directory used to locate test results when Path is not specified.
ShowSuccessful SwitchParameter optionalposition: namedpipeline: False
Include successful tests in the output (only applies to Summary format).

Outputs

System.Object

Get-ModuleTestFailures [-OutputFormat <Summary|Detailed|Json>] [-PassThru] [-ProjectPath <String>] [-ShowSuccessful] -TestResults <Object> [<CommonParameters>]
#
Parameter set: TestResults

Parameters

OutputFormat ModuleTestFailureOutputFormat optionalposition: namedpipeline: Falsevalues: 3
Format for displaying test failures.
Possible values: Summary, Detailed, Json
PassThru SwitchParameter optionalposition: namedpipeline: False
Return the failure analysis object for further processing.
ProjectPath String optionalposition: namedpipeline: False
Path to the project directory used to locate test results when Path is not specified.
ShowSuccessful SwitchParameter optionalposition: namedpipeline: False
Include successful tests in the output (only applies to Summary format).
TestResults Object requiredposition: namedpipeline: True (ByValue)
Pester test results object from Invoke-Pester, a ModuleTestSuiteResult from Invoke-ModuleTestSuite, or a precomputed ModuleTestFailureAnalysis.

Outputs

System.Object