Infrastructure Testing with Pester Talk

I just finished the first of hopefully more live talks on Youtube Live.

Go here for the talk: Infrastructure Testing with Pester

After a few technical glitches during the testing phase, things went smoothly during the live presentation. It was a fun experience and I hope people did and will get a lot out of the content.

The attitude I was trying to get across in this talk was to build the foundation first and structure configuration data outside of functional code. Then reuse this code for your tests. Writing Pester tests is the easy part, designing the right tests is the hard part.

Here’s a rundown:

  • Infrastructure tests:
    • Allow you to trust your code more
    • They define “working”
    • They provide more reliable code deployments
  • Don’t get caught up on the tool you use to implement infrastructure tests. Pester is awesome if you’re familiar with PowerShell but since we’re not testing code like unit tests, you can really use anything.
  • Pay attention to test dependencies! Just because you’re testing whether a file exists after your code runs doesn’t mean that the volume that it was supposed to be on is there or even if you have a network connection.
  • We built a build pipeline concept with DSC: Source –> Build –> Test

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.

Latest posts by Adam Bertram (see all)

Leave a Reply