Tag: Pester

Building an Azure Devops Pipeline [Soup to Nuts]

When you search online, you will find various blog posts, documentation and tutorials on Azure DevOps. All of these items are valuable resources but rarely does one walk you through a real-world scenario. Many skim over the security aspect leaving passwords in clear text for simplicity or an end product that essentially does nothing. Let's change that.

Adam Bertram Avatar Adam Bertram

15 min. read

Understanding Mocking in Pester

If you want to ensure your PowerShell code is in tip-top shape, you need to be unit testing it. Pester is a popular unit-testing framework built for PowerShell code that allows you to ensure the code you write is as you expect and stays that way.

Adam Bertram Avatar Adam Bertram

3 min. read

How to Build PowerShell Functions for Easier Pester Testing

When testing PowerShell modules and scripts, the de facto standard is Pester. Pester is a unit testing framework that allows a developer to pick apart and confirm various bits and pieces of PowerShell code.

Adam Bertram Avatar Adam Bertram

3 min. read

How to Deal with Dependencies in Your Pester Infrastructure Tests

When writing Pester infrastructure tests, you'll ultimately run across a common problem; dealing with dependencies. Unlike unit tests, infrastructure tests actually run real code and touch the real environment. A real environment is complicated and full of dependencies on compute, networking, storage, etc.

Adam Bertram Avatar Adam Bertram

3 min. read

How I Learned Pester by Infrastructure Testing a Domain Controller Build

In this post, learn how you can perform infrastructure testing in your environment using the PowerShell testing framework, Pester! You'll learn by following along with a story of how I learned by building a domain controller.

Bill Kindle Avatar Bill Kindle

5 min. read

How to Use Pester Tags for Targeted Testing

During the construction of a set of Pester tests, it can be increasingly difficult to follow the flow of each of the tests and the subjects against which these tests will be performed.

Bill Kindle Avatar Bill Kindle

3 min. read

Validating your Windows Server 2016 configuration

So you bring up a new Windows Server machine, you're done installing and configuring it how you'd like it to look, perhaps deployed it into your test environment and run a few PowerShell scripts against it. You're done, right? Not so fast. Are you sure all of your standard checklist of things have been applied correctly? Validate that Server 2016 configuration with the testing framework, Pester!

Adam Bertram Avatar Adam Bertram

4 min. read

Write PowerShell Tests with Pester: Getting Started

Learn how to write Powershell tests with the PowerShell module, Pester.

Adam Bertram Avatar Adam Bertram

8 min. read

Testing Function Execution Order in Pester

If you want to ensure commands inside of your PowerShell scripts execution in a specific order, build Pester tests to ensure they do.

Adam Bertram Avatar Adam Bertram

3 min. read

What is Pester for PowerShell?

As you begin to depend on your PowerShell scripts for more important tasks, you'll discover that building tests for those scripts become necessary.

Adam Bertram Avatar Adam Bertram

3 min. read

An Easier Way to Control Pester Tests

Learn how to build a PowerShell function to better control your Pester tests!

Adam Bertram Avatar Adam Bertram

2 min. read

Your Code Sucks. Sincerely, Pester

Be sure to check out the Pester Book for just about everything you need to know out testing PowerShell code with Pester!

Adam Bertram Avatar Adam Bertram

2 min. read

Subscribe to Adam the Automator

Get the latest posts delivered right to your inbox