# Invoke-ModuleTestSuite

Complete module testing suite that handles dependencies, imports, and test execution.

Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

[View on GitHub](https://github.com/EvotecIT/PSPublishModule) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSPublishModule/releases/tag/v3.0.124) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSPublishModule/2.0.27)

Stars **48**

Forks **15**

Open issues **1**

PowerShell Gallery downloads **17,213**

Release **v3.0.195**

Language: C# Updated: 2026-11-25

Command 

**Module**

`PSPublishModule`

**Inputs**

`None`

Complete module testing suite that handles dependencies, imports, and test execution.

## Syntax

```
Invoke-ModuleTestSuite
[-AdditionalModules <String[]>]
[-CICD]
[-EnableCodeCoverage]
[-ExitOnFailure]
[-FailureSummaryFormat <Summary|Detailed>]
[-Force]
[-OutputFormat <Detailed|Normal|Minimal>]
[-PassThru]
[-ProjectPath <String>]
[-ShowFailureSummary]
[-SkipDependencies]
[-SkipImport]
[-SkipModules <String[]>]
[-TestPath <String>]
[-TimeoutSeconds <Int32>]
[<CommonParameters>]
```

[#](#member-87fb5c05fcb597ab3726f151)

Parameter set: `All Parameter Sets`

## Description

Executes module tests out-of-process, installs required dependencies, and provides a summary that is suitable for both local development and CI pipelines.

For post-processing failures (e.g. emitting JSON summaries), combine it with Get-ModuleTestFailures.

## Examples

### Run the full test suite for a module

```powershell
Invoke-ModuleTestSuite -ProjectPath 'C:\Git\MyModule'
```

Runs tests under the module project folder, installs dependencies, and prints a summary.

### Run in CI mode and return the result object

```powershell
Invoke-ModuleTestSuite -ProjectPath 'C:\Git\MyModule' -CICD -PassThru
```

Optimizes output for CI and returns a structured result object.

### Pipe results into Get-ModuleTestFailures

```powershell
Invoke-ModuleTestSuite -ProjectPath 'C:\Git\MyModule' -PassThru | Get-ModuleTestFailures -OutputFormat Summary
```

Produces a concise failure summary that can be used in CI logs.

## Parameters

**-AdditionalModules String[] optional**

Additional modules to install beyond those specified in the manifest.

**-CICD SwitchParameter optional**

Enable CI/CD mode with optimized settings and output.

**-EnableCodeCoverage SwitchParameter optional**

Enable code coverage analysis during tests.

**-ExitOnFailure SwitchParameter optional**

Set a non-zero process exit code when tests fail.

**-FailureSummaryFormat ModuleTestSuiteFailureSummaryFormat optional**

Format for failure summary display.

Possible values: `Summary`, `Detailed`

**-Force SwitchParameter optional**

Force reinstall of modules and reimport of the target module.

**-OutputFormat ModuleTestSuiteOutputFormat optional**

Test output format.

Possible values: `Detailed`, `Normal`, `Minimal`

**-PassThru SwitchParameter optional**

Return the test suite result object.

**-ProjectPath String optional**

Path to the PowerShell module project directory.

**-ShowFailureSummary SwitchParameter optional**

Display detailed failure analysis when tests fail.

**-SkipDependencies SwitchParameter optional**

Skip dependency checking and installation.

**-SkipImport SwitchParameter optional**

Skip module import step.

**-SkipModules String[] optional**

Array of module names to skip during installation.

**-TestPath String optional**

Custom path to test files (defaults to Tests folder in project).

**-TimeoutSeconds Int32 optional**

Timeout for the out-of-process test execution, in seconds.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:DD4CE513668C01CB9A8A4FAFDEF2C44347D24554903DC53932957E7CC7489BD2 -->
