~/talk

Beyond Pester 101: Applying testing principles to PowerShell

Talkat PowerShell + DevOps Global Summit 2018 · 2018-04-09..04-12· [testing]
slides:none on file

Shows concrete practices not promises: uses Pester and a custom Invoke-ParallelTests to cut a DC networking module’s 985 unit tests from ~80 seconds down to about 42 seconds (but loses code coverage and reveals race conditions); reports a roughly 10:1 unit-to-integration test ratio and a test that ran 208 times without failing; recommends characterization tests for legacy code, mocking private wrappers to enable black‑box tests, removing slow or always‑green tests, and tagging to fail fast.

AI-written summary · about

  1. 0:00Beyond Pester 101: Applying testing principles to PowerShell
  2. 0:11Beyond Pester 101 Applying testing principles to PowerShell
  3. 3:56Beginning the ascent.
  4. 4:42To reduce the risk that a user will experience an unexpected behaviour
  5. 6:39Kinds of tests?
  6. 12:062. Integration 3. Unit (Again?)
  7. 13:30Behavioural "What it does"
  8. 17:442. Integration 3. Unit (Black box)
  9. 18:00A characterization test is a test that characterizes the actual behavior of a piece of code ... The tests document the actual current behavior of the system
  10. 21:17The second half of the slope.
  11. 23:59Downsides?
  12. 24:22Code Coverage
  13. 25:41Not suitable for everything
  14. 26:43Use data! (Pester Output Files)
  15. 32:50Reduce duration Remove tests Reorder tests General maintenance
  16. 34:18Unit (White box) Integration Unit (Black box) Characterisation
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.