Powershell: Move to new Pester version

Created on 13 Jan 2017  路  11Comments  路  Source: PowerShell/PowerShell

Now Pester v3.4.5 support output filters https://github.com/pester/Pester/issues/645. We can use this to reduce the CI output.

Currently we use very old Pester version 3.3.9 (May 23, 2015) so perhaps the time has come to move to new version.

Resolution-Fixed WG-Quality-Test

Most helpful comment

@JamesWTruher Pester is published to nuget.org, Chocolatey and the PowerShell Gallery. Technically all three of those are nuget feeds; take your pick. :)

All 11 comments

@JamesWTruher and @adityapatwardhan - Have you guys investigated moving to a later version of Pester?

@joeyaiello I wonder shall we distribute PowerShell 6 RTM with old Pester? Should we add this in Plan?

As far as I understood from @JamesWTruher, the plan was always to be conservative with picking up new versions of Pester. Basically, that we shouldn't ship a new one unless we had a reason to pick up the new stuff.

It may very well be the case that we need to do that, but I'd like Jim to come in and make sure I've got the history right first.

I agree that conservatism here is good. But two years is too much.

There is another problem. If Windows users can easily upgrade Pester and exploit new features, the Unix users cannot do this. This is really a problem for those who want to be fully ported.

Related #1371

cc @JamesWTruher

I've been looking at Pester 4.0.8 and it looks really great. Lot's of excellent improvements; First and foremost handling our cross-plat needs, but it's not completely backwardly compatible, and I get more than 100 test failures when I run our tests using 4.0.8. I've got a big bunch of them fixed and all of those are test issues, but it's taking a bit of time to track them all down.

The issues boil down to a couple of things - missing/changed assertions (Contains/FileContentMatch), Be actually working against arrays (_awesome_), and tests which never actually worked, and because error checking has improved to catch them, like Should Throw which now complains if it doesn't get a scriptblock, those tests are properly failing.

I do look forward to the time when we can just grab this and dump our submodule and it shouldn't be too long now. @dlwyatt Is there any thought of making this a nupkg?

@JamesWTruher Pester is published to nuget.org, Chocolatey and the PowerShell Gallery. Technically all three of those are nuget feeds; take your pick. :)

@dlwyatt awesome!

Pester since v. 4.1.0 is supported at PSCore 6.0 for all platforms (Linux, macOS, Windows - in alphabetical order).

Fixed in #6064

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SteveL-MSFT picture SteveL-MSFT  路  3Comments

Michal-Ziemba picture Michal-Ziemba  路  3Comments

rkeithhill picture rkeithhill  路  3Comments

JohnLBevan picture JohnLBevan  路  3Comments

aragula12 picture aragula12  路  3Comments