You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document soft assertions: explain -ErrorAction on generated Should-* pages + add a dedicated "Soft assertions" entry #385
Pester v6's "soft assertion" behaviour (collect all failures instead of stopping at the first one) is under-documented and hard to discover. The word "soft assertion" does not appear anywhere on https://pester.dev today — the feature is only described at the bottom of the Should page under the heading "Collect all Should failures".
This issue tracks two related documentation improvements.
1. Document -ErrorAction on the generated Should-* Command Reference pages
On every generated Should-* page (e.g. Should-Be), -ErrorAction currently only shows up in the generic boilerplate line:
This cmdlet supports the common parameters: -Debug, -ErrorAction, …
There is no hint that, for assertions, -ErrorAction is the knob that controls soft-assertion behaviour:
-ErrorAction Continue — record the failure but keep going (soft assertion)
-ErrorAction Stop — fail the test immediately (e.g. to guard a precondition before continuing)
We should surface this per-assertion meaning on the generated pages (e.g. via the comment-based help description/notes for the Should-* commands).
⚠️ Note: the Command Reference pages are auto-generated from comment-based help in the pester/pester source, so the actual text change for this part needs to land there. Filing here to track the overall documentation gap.
2. Add a dedicated "Soft assertions" entry describing how to enable them for every assertion
Add a discoverable entry (own section/page in the Assertions section) that:
Uses the term "soft assertions" explicitly so it's searchable.
Explains how to turn them on globally for every assertion, rather than per-assertion:
$config=New-PesterConfiguration$config.Should.ErrorAction='Continue'# or via $PesterPreference.Should.ErrorAction = 'Continue'
Notes that the global setting is honoured by both the classic Should -Be syntax and the new Should-* assertions.
Shows how to override it on a single assertion with -ErrorAction Stop (precondition) / -ErrorAction Continue.
Cross-links from / consolidates the existing "Collect all Should failures" section.
Opened #397 which implements Part 2 of this issue: a dedicated, searchable "Soft assertions" page under Assertions (docs/assertions/soft-assertions.mdx). It defines the term, shows how to enable soft assertions globally via Should.ErrorAction = 'Continue' (noting both Should -Be and Should-* honour it), covers the per-assertion -ErrorAction Stop/Continue override, and consolidates the old "Collect all Should failures" section into a link to the new page.
Part 1 is intentionally left out of that PR. Surfacing the per-assertion -ErrorAction meaning on the generated Should-* Command Reference pages (e.g. Should-Be) needs a comment-based-help change in the pester/pester source, since those pages are auto-generated — it can't be done in this docs repo. That's why #397 says Addresses #385 rather than Closes, so this issue can stay open to track Part 1 separately.
Activity
nohwnd commentedon Jul 3, 2026
Opened #397 which implements Part 2 of this issue: a dedicated, searchable "Soft assertions" page under Assertions (
docs/assertions/soft-assertions.mdx). It defines the term, shows how to enable soft assertions globally viaShould.ErrorAction = 'Continue'(noting bothShould -BeandShould-*honour it), covers the per-assertion-ErrorAction Stop/Continueoverride, and consolidates the old "Collect all Should failures" section into a link to the new page.Part 1 is intentionally left out of that PR. Surfacing the per-assertion
-ErrorActionmeaning on the generatedShould-*Command Reference pages (e.g.Should-Be) needs a comment-based-help change in the pester/pester source, since those pages are auto-generated — it can't be done in this docs repo. That's why #397 saysAddresses #385rather thanCloses, so this issue can stay open to track Part 1 separately.docs: add dedicated "Soft assertions" page (#385) (#397)
Document -ErrorAction soft-assertion behavior on Should-* commands (#…
Use the term "soft assertions" on the v5 Should page (#450)