Skip to content
ConsoleMonster
Cmdlet

Invoke-ConsolePester

Module ConsoleMonster
Inputs
None
Outputs
System.Management.Automation.PSObject

Runs Pester tests with a live ConsoleMonster dashboard and a summary table.

Syntax

Invoke-ConsolePester [-CI] [-Container <Object[]>] [-ExcludePath <String[]>] [-ExcludeTagFilter <String[]>] [-ExportHtml <String>] [-FullNameFilter <String[]>] [-FullScreen] [-NoLiveView] [-Output <Diagnostic|Detailed|Normal|Minimal>] [-PassThru] [[-Path] <String[]>] [-TagFilter <String[]>] [-Title <String>] [<CommonParameters>]
#
Parameter set: Simple
Invoke-ConsolePester -Configuration <Object> [-ExportHtml <String>] [-FullScreen] [-NoLiveView] [-Title <String>] [<CommonParameters>]
#
Parameter set: Advanced

Description

Runs Pester tests with a live ConsoleMonster dashboard and a summary table.

Takes the parameters of Invoke-Pester (Path, ExcludePath, TagFilter, ExcludeTagFilter, FullNameFilter, Container, Output, CI, PassThru) or a -Configuration (a PesterConfiguration or a hashtable), and runs Pester 5 or 6, imported when first needed. While the tests run, an inline area (or the full screen with -FullScreen) shows the run totals and the clock, the test files as lanes with passed, failed and skipped counts, the running test, and with -FullScreen the failures (expected against actual, the file and line as a link), the slowest tests and a histogram of durations. When the run ends a table of results by file, the failures and the totals are written to the scrollback, and -ExportHtml saves the final dashboard. In redirected output, jobs and CI logs the output is one line per failure and a summary line. Pester's result object is returned with -PassThru (or Run.PassThru), Run.Throw and Run.Exit (-CI) are applied after the summary, and Write-Host output from tests appears above the inline area. Pester has no public reporter API, so the live view uses Pester's internal plugin steps through a guarded adapter; when the internals are not what it expects (or with Run.Parallel or Output None) Pester runs unchanged with its own output and the summary table follows. Works on Windows PowerShell 5.1 and PowerShell 7.

Examples

Authored help example

EXAMPLE 1

Invoke-ConsolePester -Path @('C:\Path')

EXAMPLE 2

Invoke-ConsolePester -Configuration 'Value'

Parameters

-CI SwitchParameter optionalsets: Simple
CI mode as in Invoke-Pester: test results are written and the process exits with the failure count.
-Container Object[] optionalsets: Simple
Containers from New-PesterContainer (Run.Container).
-ExcludePath String[] optionalsets: Simple
Files or folders to leave out (Run.ExcludePath).
-ExcludeTagFilter String[] optionalaliases: ExcludeTagsets: Simple
Leave out tests with these tags (Filter.ExcludeTag).
-ExportHtml String optional
Saves the final dashboard as an HTML page.
-FullNameFilter String[] optionalsets: Simple
Run only tests whose full name matches (Filter.FullName).
-FullScreen SwitchParameter optional
Shows the dashboard on the full screen (alternate screen) instead of inline.
-NoLiveView SwitchParameter optional
Runs Pester unchanged with its own output, followed by the summary table (no adapter).
-Output String optionalsets: Simple
Pester's output verbosity (Output.Verbosity). None runs quietly: no dashboard and no summary.
Possible values: Diagnostic, Detailed, Normal, Minimal
-PassThru SwitchParameter optionalsets: Simple
Returns Pester's result object.
-Path String[] optionalposition: 0sets: Simple
Test files or folders (Run.Path); default the current folder.
-TagFilter String[] optionalaliases: Tagsets: Simple
Run only tests with these tags (Filter.Tag).
-Title String optional
The dashboard title (default Pester).
-Configuration Object requiredsets: Advanced
A PesterConfiguration (New-PesterConfiguration) or a hashtable with the same sections.

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.