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

New-ConfigurationTest

Namespace PSPublishModule
Inputs
None
Outputs
System.Object

Configures running Pester tests as part of the build.

Remarks

Emits a test configuration segment that instructs the pipeline to run Pester tests after the module is merged/built. Use this when you want builds to fail fast on test failures.

Examples

Authored help example

Enable Pester tests during the build

PS>


New-ConfigurationTest -Enable -TestsPath 'Tests'
        

Runs tests from the Tests folder after the build/merge step.

Force test execution (ignore caching)

PS>


New-ConfigurationTest -Enable -TestsPath 'Tests' -Force
        

Useful in CI when you always want a fresh test run.

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

New-ConfigurationTest [-Enable] [-Force] -TestsPath <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Enable SwitchParameter optionalposition: namedpipeline: False
Enable test execution in the build.
Force SwitchParameter optionalposition: namedpipeline: False
Force running tests even if caching would skip them.
TestsPath String requiredposition: namedpipeline: False
Path to the folder containing Pester tests.

Outputs

System.Object