An introduction to infrastructure testing with PowerShell Pester

screenshot-4sysops.com 2016-03-06 12-47-54When a software developer is asked about testing, they’ll most likely talk about unit, integration, functional, or acceptance testing. These are the kinds of tests that have been around for decades and are considered formal testing strategies. Then, one day, system administrators decided they wanted in on the coding action, and infrastructure development was born. I’m going to define an “infrastructure developer” as anyone that writes code to provision and manage any kind of infrastructure.

Infrastructure code, by its nature, changes stuff in an environment. It provisions VMs, installs software, copies files, and so on. It’s advisable to write unit tests to check the code itself, integration tests to ensure the code changed the stuff you intended, and acceptance tests to test the result. However, there’s a gray area in there that’s like a combination of integration and acceptance testing; I’m calling this infrastructure testing.

Infrastructure testing is primarily testing the result of infrastructure code or just ensuring the infrastructure works as expected; no code involved at all. Think of infrastructure testing as simply writing code to ensure servers are online, registry keys are created in the right spot, files are where they’re supposed to be, user accounts are created correctly, etc…

Read the full article on 4SysOps.

Adam Bertram

Chief Automator at Adam the Automator, LLC
Adam Bertram is an independent consultant, technical writer, trainer and presenter. Adam specializes in consulting and evangelizing all things IT automation mainly focused around Windows PowerShell. Adam is a Microsoft Windows PowerShell MVP, 2015 powershell.org PowerShell hero and has numerous Microsoft IT pro certifications. He authors IT pro course content for Pluralsight, is a regular contributor to numerous print and online publications and presents at various user groups and conferences.You can find Adam here on the blog or on Twitter at @adbertram.

One comment

Leave a Reply