Packet Pushers - Datanauts

Datanauts 132: Unit Testing For Fun And Profit


Listen Later

While performing a routine sensor sweep of the Gargleblaster nebula, the crew of the Datanauts starship noticed that many of the tasks are manual in nature and could, with a little effort, be automated with some scripting.
However, every time we moved on from one part of the nebula to another, a different error would crop up with the script’s code. Isn’t there some way that we can automatically test our code to make sure that more time is spent drinking a frothy ale instead of all this debugging?
On today’s episode with talk with Adam Bertram, a Microsoft MVP and author of The Pester Book.
He is currently a Senior Systems Automation Engineer working with PowerShell, Desired State Configuration, and various other DevOps tools to coordinate reliable software deployments for a biotech company. You can find his work at adamtheautomator.com.
We start by defining a unit test for scripts, and how unit testing differs from integration, functional, regression tests, and others.
Then we dive into why you’d want to test your scripts (testing isn’t just for developers!), and how to create these tests.
We also talk about the notion of test-driven development, and dive into Pester, which is a testing framework for PowerShell.
Show Links:
Adam Bertram on Twitter
Adam The Automator.com
The Pester Book – Adam Bertram
...more
View all episodesView all episodes
Download on the App Store

Packet Pushers - DatanautsBy Packet Pushers Interactive LLC