Skip to Main Content
Learn PowerShell Scripting in a Month of Lunches, Second Edition
book

Learn PowerShell Scripting in a Month of Lunches, Second Edition

by James Petty, Jeffery Hicks, Don Jones
April 2024
Beginner to intermediate content levelBeginner to intermediate
336 pages
8h 51m
English
Manning Publications
Content preview from Learn PowerShell Scripting in a Month of Lunches, Second Edition

20 Pestering your script

Pester is a powerful tool for automating your testing in PowerShell scripts. As we transition into a DevOps-oriented world, it becomes crucial to ensure the reliability of your scripts. No one wants a broken script running in a production environment. Even if you test your script initially, modifications or unique conditions might arise that require retesting. This chapter will delve into automated unit testing for PowerShell scripts using Pester.

20.1 The vision

Here’s where we want to get you:

  1. You write some code or modify some old code.

  2. You check your code into a source control repository.

  3. The repository triggers a continuous integration pipeline. Usually incorporating third-party tools, the pipeline builds a ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn PowerShell Scripting in a Month of Lunches

Learn PowerShell Scripting in a Month of Lunches

Jeffery Hicks, Don Jones
Learn PowerShell in a Month of Lunches, Fourth Edition

Learn PowerShell in a Month of Lunches, Fourth Edition

Tyler Leonhardt, Travis Plunk, James Petty

Publisher Resources

ISBN: 9781633438989Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link