PowerShell Pester testing – Getting started
Pester is a testing framework that allows you to validate the functionality of your PowerShell scripts. In a series of several posts, I will give you an overview of how you can test your PowerShell scripts. In today’s post, I show you how to get started with Pester.
System administrators have traditionally been the ones to use the tools developers provide to them. Although most admins write scripts to automate various tasks, the code is not taken all that seriously. If it works, it works, and it’s time to move on. The problem stems from the mentality that PowerShell scripters have versus that of PowerShell developers. When PowerShell was first brought into the world, its core focus was for system administrators. System administrators loved writing scripts to automate various tasks, but PowerShell was never a development platform, per se.
Fast forward to 2016, where you now have classes, robust debugging support, and a community dedicated to taking PowerShell from being treated just as a scripting language to being acknowledged as a development language. I’m a perfect example of this. I’m a Senior Systems Automation Engineer, and I write PowerShell all day, every day. I check my code into source control, collaborate with others on my code, and am involved in the occasional releases of our automation platform to customers. I’m a PowerShell developer, and at this point, it’s time to get serious and to start investing in testing…
Read the full article at 4SysOps.
Latest posts by Adam Bertram (see all)
- Infrastructure Testing with Pester Talk - April 21, 2017
- Assigning Permissions to Azure Management APIs with PowerShell - April 17, 2017
- Start Small to Overcome Anxiety and Depression - April 14, 2017