PSMutant

0.2.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 -RequiredVersion 0.2.0

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

Install-PSResource -Name PSMutant -Version 0.2.0

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

Adds -RecheckFrom (re-run only a previous report's survivors, with counts instead of a score and a refusal when the source or operator set moved) and the equivalents config map (declare mutants that cannot change behaviour, with reasons; the run fails if a declaration is killed or goes stale). Fixes a throw on an empty candidate set. Coverage and self-mutation both at 100%.

FileList

Version History

Version Downloads Last updated
0.2.2 5 8/18/2026
0.2.1 5 8/18/2026
0.2.0 (current version) 6 8/17/2026
0.1.0 81 7/3/2026