PSMutant

0.1.0

Mutation testing for PowerShell. Injects small faults (flip -eq to -ne, $true to $false, N to N+1, drop -not) into your scripts using the PowerShell AST and reports how many your Pester suite catches - the metric line coverage cannot give you. Runs mutants in a throwaway sandbox so your source is never modified.

Minimum PowerShell version

7.2

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name PSMutant

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name PSMutant

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) Fortigi. MIT licensed.

Package Details

Author(s)

  • Fortigi

Tags

mutation-testing testing pester ast quality test-quality coverage

Functions

Invoke-PSMutation Get-PSMutationCandidate Set-PSMutationText

Dependencies

Release Notes

Initial release: AST-based mutation operators (binary, boolean, number, string, negation), sandboxed in-process execution, covered-lines-only filtering, JSON report, and report-only/break thresholds.

FileList

Version History

Version Downloads Last updated
0.1.0 (current version) 9 7/3/2026