psmodule/Invoke-Pester (by PSModule)

Runs test, using Pester and PowerShell.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 9, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: psmodule/invoke-pester@4ff33199141fdf22568990b6107fe3148ae93a1c # v5.1.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
PathPath to where tests are located or a configuration file. no
VersionVersion of the Pester module to install, using NuGet version-range syntax, e.g. '[6.0.0,7.0.0)' to allow any 6.x. A bare version such as '6.4.0' installs that exact version. When empty, the latest available version is installed. no
PrereleaseAllow installing prerelease versions of Pester. nofalse
GuidOptional module identity (GUID) that the installed Pester must match, mirroring the GUID key of a '#Requires -Modules @{ ... }' declaration. When set, the run fails fast if the loaded Pester's GUID does not match, guarding against a different module named Pester on the runner's module path. no
ReportAsJsonOutput generated reports in JSON format in addition to the configured format through Pester. notrue
PrescriptScript to be executed before the test run. This script is executed in the same context as the test run. no
Notice_ModeControls when to show notices for test completion. Allows "Full" (show on success and failure), "Failed" (show only on failure), or "None" (disable notices). noFailed
StepSummary_ModeControls which tests to show in the GitHub step summary. Allows "Full" (show all tests), "Failed" (only failed tests), or "None" (disable step summary). noFailed
StepSummary_ShowTestOverviewControls whether to show the test overview table in the GitHub step summary. nofalse
StepSummary_ShowConfigurationControls whether to show the configuration details in the GitHub step summary. nofalse
Run_PathDirectories to be searched for tests, paths directly to test files, or combination of both. no
Run_ExcludePathDirectories or files to be excluded from the run. no
Run_ScriptBlockScriptBlocks containing tests to be executed. no
Run_ContainerContainerInfo objects containing tests to be executed. no
Run_TestExtensionFilter used to identify test files. no
Run_ExitExit with non-zero exit code when the test run fails. Exit code is always set to `$LASTEXITCODE` even when this option is `$false`. When used together with Throw, throwing an exception is preferred. no
Run_ThrowThrow an exception when test run fails. When used together with Exit, throwing an exception is preferred. no
Run_SkipRunRuns the discovery phase but skips run. Use it with PassThru to get object populated with all tests. no
Run_SkipRemainingOnFailureSkips remaining tests after failure for selected scope, options are None, Run, Container and Block. no
Filter_TagTags of Describe, Context or It to be run. no
Filter_ExcludeTagTags of Describe, Context or It to be excluded from the run. no
Filter_LineFilter by file and scriptblock start line, useful to run parsed tests programmatically to avoid problems with expanded names. Example: 'C:\tests\file1.Tests.ps1:37' no
Filter_ExcludeLineExclude by file and scriptblock start line, takes precedence over Line. no
Filter_FullNameFull name of test with -like wildcards, joined by dot. Example: '*.describe Get-Item.test1' no
CodeCoverage_EnabledEnable CodeCoverage. no
CodeCoverage_OutputFormatFormat to use for code coverage report. Possible values: JaCoCo, CoverageGutters, Cobertura no
CodeCoverage_OutputPathPath relative to the current directory where code coverage report is saved. no
CodeCoverage_OutputEncodingEncoding of the output file. no
CodeCoverage_PathDirectories or files to be used for code coverage, by default the Path(s) from general settings are used, unless overridden here. no
CodeCoverage_ExcludeTestsExclude tests from code coverage. This uses the TestFilter from general configuration. no
CodeCoverage_RecursePathsWill recurse through directories in the Path option. no
CodeCoverage_CoveragePercentTargetTarget percent of code coverage that you want to achieve. no
CodeCoverage_UseBreakpointsEXPERIMENTAL: When false, use Profiler based tracer to do CodeCoverage instead of using breakpoints. no
CodeCoverage_SingleHitBreakpointsRemove breakpoint when it is hit. no
TestResult_EnabledEnable TestResult. no
TestResult_OutputFormatFormat to use for test result report. Possible values: NUnitXml, NUnit2.5, NUnit3 or JUnitXml no
TestResult_OutputPathPath relative to the current directory where test result report is saved. no
TestResult_OutputEncodingEncoding of the output file. no
TestResult_TestSuiteNameSet the name assigned to the root 'test-suite' element. no
Should_ErrorActionControls if Should throws on error. Use 'Stop' to throw on error, or 'Continue' to fail at the end of the test. no
Debug_ShowFullErrorsShow full errors including Pester internal stack. This property is deprecated, and if set to true it will override Output.StackTraceVerbosity to 'Full'. no
Debug_WriteDebugMessagesWrite Debug messages to screen. no
Debug_WriteDebugMessagesFromWrite Debug messages from a given source, WriteDebugMessages must be set to true for this to work. You can use like wildcards to get messages from multiple sources, as well as * to get everything. no
Debug_ShowNavigationMarkersWrite paths after every block and test, for easy navigation in VSCode. no
Debug_ReturnRawResultObjectReturns unfiltered result object, this is for development only. Do not rely on this object for additional properties, non-public properties will be renamed without previous notice. no
Output_VerbosityThe verbosity of output, options are None, Normal, Detailed and Diagnostic. no
Output_StackTraceVerbosityThe verbosity of stacktrace output, options are None, FirstLine, Filtered and Full. no
Output_CIFormatThe CI format of error output in build logs, options are None, Auto, AzureDevops and GithubActions. no
Output_CILogLevelThe CI log level in build logs, options are Error and Warning. no
Output_RenderModeThe mode used to render console output, options are Auto, Ansi, ConsoleColor and Plaintext. no
TestDrive_EnabledEnable TestDrive. no
TestRegistry_EnabledEnable TestRegistry. no
DebugEnable debug output.nofalse
VerboseEnable verbose output.nofalse
GitHubVersionVersion of the GitHub module to install during the init bootstrap step, using NuGet version-range syntax. A bare version such as '1.8.0' installs that exact version. When empty, the latest available version is installed. no
GitHubPrereleaseAllow installing prerelease versions of the GitHub module.nofalse
WorkingDirectoryThe working directory where the script will run from.no.
namedescription
OutcomeThe outcome of the test run.
ConclusionThe conclusion of the test run.
ExecutedWhether tests were executed.
ResultOverall result of the Pester test run (e.g., Passed, Failed).
FailedCountNumber of failed tests.
FailedBlocksCountNumber of failed blocks.
FailedContainersCountNumber of failed containers.
PassedCountNumber of passed tests.
SkippedCountNumber of skipped tests.
InconclusiveCountNumber of inconclusive tests.
NotRunCountNumber of tests not run.
TotalCountTotal count of tests.