Beyond Pester 103: Applying a Testing Mindset
summary
Shows concrete refactors: a monolithic AD cleanup script splits into functions (Get-OldAccounts, Exclude, Disable, Delete, Log) and Pester tests for 45‑day disable and six‑month delete, with Pester mocking and a fix for the implicit Get-Date dependency. Recommends single responsibility principle, practicing TDD (write one failing test, make it pass, refactor), and tools beyond Pester: Gherkin, InSpec, OPA/Rego, HashiCorp Sentinel, Gatling. Cites Dora numbers (elite ~10% manual testing vs 30–50% for low performers) and saves developer hours by earlier feedback.
AI-written summary · about
chapters (11)
- 0:00Testing mindset intro
- 3:33What is testing mindset
- 7:00Personal testing journey
- 12:16Why test PowerShell
- 17:57Testable PowerShell code
- 22:10Test-driven PowerShell
- 29:35Categorizing PowerShell tests
- 32:43Operational verification tests
- 36:55Additional testing tools
- 39:43Two testing mindset questions
- 40:48Q&A
related talks
36mBeyond Pester 101: Applying testing principles to PowerShell
43mBeyond Pester 102: Acceptance testing with PowerShell
41mPesterize Your Code!!
37mTesting, Testing, 1...2...3: Using Pester for Infrastructure ...
03h 02mPowerShell Unit and Infrastructure Testing
48mHow to Love Unit Testing
45mSerendipity and Perseverance — Injecting Testing in a Test-Resistant Team
59m.NET Testing Techniques You Didn’t Know You Needed
