PSMutant
0.3.1
Minimum PowerShell version
7.2
Installation Options
Owners
Copyright
(c) Fortigi. MIT licensed.
Package Details
Author(s)
- Fortigi
Tags
mutation-testing testing pester ast quality test-quality coverage
Functions
Dependencies
This module has no dependencies.
Release Notes
**Breaking: the module now exports one function.** `Invoke-PSMutation` is the whole surface.
If you called `Get-PSMutationCandidate` or `Set-PSMutationText`, they are gone -- they were
never documented, and the object they returned was never a declared contract. What you should
depend on instead is the report JSON, which now has a published schema.
**Your config is checked more strictly, and mistakes are errors rather than silence.** A
misspelled key used to be ignored, which quietly weakened the run: `thresholds.brake` left the
break gate unable to fail at all, and a misspelled operator was dropped and then reported as
though it had run. A value of the wrong type did the same -- `"timeoutFactor": "four"` left the
per-mutant timeout empty, and an expired timeout counts as a kill, so the score was higher than
the tests earned. Both are refused now, and the message names the key and suggests the nearest
valid one.
If you have been running with a typo, this release will fail your config where it previously
ran. That is the point: the run it was giving you was not measuring what you thought.
**Both formats are published as JSON Schemas**, in `schemas/v1/`. Point your config at
`config.schema.json` with a `$schema` key and it can be checked before a run instead of minutes
into one. Validate a report against `report.schema.json` if you build anything on top of it --
a dashboard, a ratchet, a merge tool. Extra fields are allowed on purpose, so a validating
reader keeps working when a later release records more.
**Reports say how they were produced**: a schema version, the module version, a timestamp, and
how long the baseline, the whole run and the per-mutant timeout took.
**`-RecheckFrom` does less work.** It skips mutants your config already declared unkillable,
and a recheck report can now seed another recheck, so the loop narrows as you write assertions.
**`Get-Help Invoke-PSMutation` returns the real documentation** -- every parameter described,
with worked examples. It was previously serving an internal note by accident.
**Score colours are correct.** A config without colour bands used to print every score green,
including 0%.
FileList
- PSMutant.nuspec
- LICENSE
- PSMutant.psd1
- PSMutant.psm1
- README.md
- schemas\v1\config.schema.json
- schemas\v1\report.schema.json
- src\Invoke-PSMutation.ps1
- src\PSMutation.Config.ps1
- src\PSMutation.Operators.ps1
- src\PSMutation.Output.ps1
- src\PSMutation.Pester.ps1
- src\PSMutation.Recheck.ps1
- src\PSMutation.Report.ps1
- src\PSMutation.Runner.ps1
- src\PSMutation.Sandbox.ps1