Blog Post

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.

Filed under: Blog Tagged: powershell, syndicated, testing


You rated this post out of 5. Change rating




You rated this post out of 5. Change rating