Installing Pester

One of the things that I believe strongly in is that we need better testing of software. Actually, what we really need is better habits and understanding of how to test our software. I don’t think we need to test everything, but we do need to know how to test some parts of our software, and we need to test those well.

Enough on testing. Let’s talk Pester. I saw Rob Sewell (b | t) talk about Pester a few months back, and it’s been on my list to try something, but time and pressure have kept it on the list and not in the code editor. A week ago that changed when I saw Rob write Write Your First Pester Test. That spurred me to devote a few minutes after I read the piece.

However, I ran into a snag. When I went to run Install-Module Pester, I got an error.

2017-11-16 13_49_27-cmd - powershell (Admin)

I tweeted a bit with Rob and Mike Fal (b | t), both of whom are some of my PoSh go-to people. They noted the Force option for install, which did work, but I not by itself.

2017-11-16 13_51_31-cmd - powershell (Admin)

As you can see there’s a security check. A good thing, but like many developers, I’m confident the Pester module on the Powershell Gallery at MS is OK. It’s got a different signature than the previous version. I could remove that, but I decided to add the –SkipPublisherCheck and move forward.

This what I wanted to see.

2017-11-16 13_51_41-cmd - powershell (Admin)

Now I can move forward with Rob’s article and try some Pester tests.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , , . Bookmark the permalink.

2 Responses to Installing Pester

  1. Pingback: Write Your first Pester Test Today | SQL DBA with A Beard

  2. Pingback: 2 Ways to Loop through collections in Pester | SQL DBA with A Beard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s