psmodule/Test-PSModule

Test a PowerShell module before publishing the module to the PowerShell Gallery.

View on GitHub

Trust Signals

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

Pinned Snippet

workflow.ymlSHA-pinned
uses: psmodule/test-psmodule@902c5e50774e6606ccf41c125a1fe89f783c1149 # v3.0.14

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

namedescriptionrequireddefault
NameThe name of the module to test. The name of the repository is used if not specified.no
SettingsThe type of tests to run. Can be either 'Module' or 'SourceCode'.yes
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). no
StepSummary_ShowTestOverviewControls whether to show the test overview table in the GitHub step summary. no
StepSummary_ShowConfigurationControls whether to show the configuration details in the GitHub step summary. no
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
VersionSpecifies the version of the GitHub module to be installed. The value must be an exact version.no
PrereleaseAllow prerelease versions if available.nofalse
WorkingDirectoryThe working directory to use for the action. This is the root folder where tests and outputs are expected.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.