psmodule/Invoke-Pester (by PSModule)
Runs test, using Pester and PowerShell.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 9, 2026
- License
- MIT
Pinned Snippet
uses: psmodule/invoke-pester@4ff33199141fdf22568990b6107fe3148ae93a1c # v5.1.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| Path | Path to where tests are located or a configuration file. | no | — |
| Version | Version 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 | — |
| Prerelease | Allow installing prerelease versions of Pester. | no | false |
| Guid | Optional 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 | — |
| ReportAsJson | Output generated reports in JSON format in addition to the configured format through Pester. | no | true |
| Prescript | Script to be executed before the test run. This script is executed in the same context as the test run. | no | — |
| Notice_Mode | Controls when to show notices for test completion. Allows "Full" (show on success and failure), "Failed" (show only on failure), or "None" (disable notices). | no | Failed |
| StepSummary_Mode | Controls which tests to show in the GitHub step summary. Allows "Full" (show all tests), "Failed" (only failed tests), or "None" (disable step summary). | no | Failed |
| StepSummary_ShowTestOverview | Controls whether to show the test overview table in the GitHub step summary. | no | false |
| StepSummary_ShowConfiguration | Controls whether to show the configuration details in the GitHub step summary. | no | false |
| Run_Path | Directories to be searched for tests, paths directly to test files, or combination of both. | no | — |
| Run_ExcludePath | Directories or files to be excluded from the run. | no | — |
| Run_ScriptBlock | ScriptBlocks containing tests to be executed. | no | — |
| Run_Container | ContainerInfo objects containing tests to be executed. | no | — |
| Run_TestExtension | Filter used to identify test files. | no | — |
| Run_Exit | Exit 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_Throw | Throw an exception when test run fails. When used together with Exit, throwing an exception is preferred. | no | — |
| Run_SkipRun | Runs the discovery phase but skips run. Use it with PassThru to get object populated with all tests. | no | — |
| Run_SkipRemainingOnFailure | Skips remaining tests after failure for selected scope, options are None, Run, Container and Block. | no | — |
| Filter_Tag | Tags of Describe, Context or It to be run. | no | — |
| Filter_ExcludeTag | Tags of Describe, Context or It to be excluded from the run. | no | — |
| Filter_Line | Filter 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_ExcludeLine | Exclude by file and scriptblock start line, takes precedence over Line. | no | — |
| Filter_FullName | Full name of test with -like wildcards, joined by dot. Example: '*.describe Get-Item.test1' | no | — |
| CodeCoverage_Enabled | Enable CodeCoverage. | no | — |
| CodeCoverage_OutputFormat | Format to use for code coverage report. Possible values: JaCoCo, CoverageGutters, Cobertura | no | — |
| CodeCoverage_OutputPath | Path relative to the current directory where code coverage report is saved. | no | — |
| CodeCoverage_OutputEncoding | Encoding of the output file. | no | — |
| CodeCoverage_Path | Directories or files to be used for code coverage, by default the Path(s) from general settings are used, unless overridden here. | no | — |
| CodeCoverage_ExcludeTests | Exclude tests from code coverage. This uses the TestFilter from general configuration. | no | — |
| CodeCoverage_RecursePaths | Will recurse through directories in the Path option. | no | — |
| CodeCoverage_CoveragePercentTarget | Target percent of code coverage that you want to achieve. | no | — |
| CodeCoverage_UseBreakpoints | EXPERIMENTAL: When false, use Profiler based tracer to do CodeCoverage instead of using breakpoints. | no | — |
| CodeCoverage_SingleHitBreakpoints | Remove breakpoint when it is hit. | no | — |
| TestResult_Enabled | Enable TestResult. | no | — |
| TestResult_OutputFormat | Format to use for test result report. Possible values: NUnitXml, NUnit2.5, NUnit3 or JUnitXml | no | — |
| TestResult_OutputPath | Path relative to the current directory where test result report is saved. | no | — |
| TestResult_OutputEncoding | Encoding of the output file. | no | — |
| TestResult_TestSuiteName | Set the name assigned to the root 'test-suite' element. | no | — |
| Should_ErrorAction | Controls if Should throws on error. Use 'Stop' to throw on error, or 'Continue' to fail at the end of the test. | no | — |
| Debug_ShowFullErrors | Show full errors including Pester internal stack. This property is deprecated, and if set to true it will override Output.StackTraceVerbosity to 'Full'. | no | — |
| Debug_WriteDebugMessages | Write Debug messages to screen. | no | — |
| Debug_WriteDebugMessagesFrom | Write 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_ShowNavigationMarkers | Write paths after every block and test, for easy navigation in VSCode. | no | — |
| Debug_ReturnRawResultObject | Returns 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_Verbosity | The verbosity of output, options are None, Normal, Detailed and Diagnostic. | no | — |
| Output_StackTraceVerbosity | The verbosity of stacktrace output, options are None, FirstLine, Filtered and Full. | no | — |
| Output_CIFormat | The CI format of error output in build logs, options are None, Auto, AzureDevops and GithubActions. | no | — |
| Output_CILogLevel | The CI log level in build logs, options are Error and Warning. | no | — |
| Output_RenderMode | The mode used to render console output, options are Auto, Ansi, ConsoleColor and Plaintext. | no | — |
| TestDrive_Enabled | Enable TestDrive. | no | — |
| TestRegistry_Enabled | Enable TestRegistry. | no | — |
| Debug | Enable debug output. | no | false |
| Verbose | Enable verbose output. | no | false |
| GitHubVersion | Version 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 | — |
| GitHubPrerelease | Allow installing prerelease versions of the GitHub module. | no | false |
| WorkingDirectory | The working directory where the script will run from. | no | . |
Outputs
| name | description |
|---|---|
| Outcome | The outcome of the test run. |
| Conclusion | The conclusion of the test run. |
| Executed | Whether tests were executed. |
| Result | Overall result of the Pester test run (e.g., Passed, Failed). |
| FailedCount | Number of failed tests. |
| FailedBlocksCount | Number of failed blocks. |
| FailedContainersCount | Number of failed containers. |
| PassedCount | Number of passed tests. |
| SkippedCount | Number of skipped tests. |
| InconclusiveCount | Number of inconclusive tests. |
| NotRunCount | Number of tests not run. |
| TotalCount | Total count of tests. |