Pester 3.0.0

Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functionality of any command inside of a piece of powershell code being tested. Pester tests can execute any command or script that is accesible to a pester test file. This can include functions, Cmdlets, Modules and scripts. Pester can be run in ad hoc style in a console or it can be integrated into the Build scripts of a Continuous Integration system.

There is a newer version of this package available.
See the version list below for details.
Install-Package Pester -Version 3.0.0
dotnet add package Pester --version 3.0.0
<PackageReference Include="Pester" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pester --version 3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

3.0.0 (August 21, 2014)
Fix code coverage tests so they do not left breakpoints set [GH-149]
Add better output for hashtables in code coverage [GH-150]
Fix Invoke-Pester -OutputXml usage of relative paths
Remove Validate-Xml function
Remove legacy object adaptations support
Remove tests testing usage of the global scope
Add function name to Code coverage output [GH-152]
Suppress pipeline output in Context / Describe [GH-155]
Coverage Output Update [GH-156]
Add initial implementation of BeforeEach / AfterEach [GH-158]
CodeCoverage of files containing DSC Configurations [GH-163]
Rolling back some earlier Pester Scope changes [GH-164]
Legacy expectations cleanup [GH-165]
Invoke-Pester tests path fix [GH-166]
Assert-MockCalled default ModuleName fix. [GH-167]
Output exception source when test fails [GH-147]
Fix for PesterThrowFailureMessage on PowerShell 2.0. [GH-171]
Pester.bat no longer enables StrictMode. [GH-172]
Fixed default behavior of fixture parameter in Describe and Context. [GH-174]
Syntax errors in test files, as well as terminating errors from Describe or Context blocks are now treated as failed tests. [GH-168]
Mock lifetime is no longer tied to It blocks. [GH-176]
Add module manifest
Added multiple lines to failure messages from Should Be and Should BeExactly. Updated console output code to support blank lines in failure messages and stack traces. [GH-185]
Fixed stack trace information when test failures come from inside InModuleScope blocks, or from something other than a Should assertion. [GH-183]
Fixed stack trace information from Describe and Context block errors in PowerShell 2.0. [GH-186]
Fixed a problem with parameter / argument resolution in mocked cmdlets / advanced functions. [GH-187]
Improved error reporting when Pester commands are called outside of a Describe block. [GH-188]
Extensive updates to help files and comment-based help for v3.0 release. [GH-190]


3.0.0-beta2 (July 4, 2014)
Add code coverage
Fix TestName
Fix direct execution of tests when the script is dot-sourced to global scope [GH-144]
Fix mock parameter filter in strict mode [GH-143]
Fix nUnit schema compatibility
Fix special characters in nUnit output


3.0.0-beta (June 24, 2014)
Add full support for module mocking
Isolate Pester internals from tested code
Tests.ps1 files can be run directly
Add It scope to TestDrive
Add It scope to Mock
Add Scope parameter to Assert-MockCalled
Measure test time more precisely

Dependencies

This package has no dependencies.

Showing the top 2 GitHub repositories that depend on Pester:

Repository Stars
MichaelGrafnetter/DSInternals
Directory Services Internals (DSInternals) PowerShell Module and Framework
GSoft-SharePoint/Dynamite
C# toolkit to help you build maintainable SharePoint 2013 farm solutions

Version History

Version Downloads Last updated
4.9.0 927 9/8/2019
4.8.1 8,106 5/11/2019
4.8.0 699 5/1/2019
4.7.3 1,742 3/23/2019
4.7.2 757 3/8/2019
4.7.1 209 3/5/2019
4.7.0 156 3/3/2019
4.4.1 15,942 9/20/2018
4.4.0 3,944 7/20/2018
4.4.0-beta2 213 7/8/2018
4.4.0-beta 262 5/6/2018
4.3.1 11,760 2/20/2018
4.2.0 272 2/18/2018
4.2.0-alpha3 313 12/17/2017
4.2.0-alpha2 256 12/12/2017
4.1.1 2,294 12/9/2017
4.1.0 309 11/21/2017
4.0.8 19,527 9/15/2017
4.0.7 245 9/13/2017
4.0.6-rc 253 8/17/2017
4.0.5-rc 316 7/25/2017
4.0.3-rc 1,348 3/22/2017
4.0.2-rc 293 1/18/2017
4.0.1-rc 284 1/18/2017
4.0.0-rc1 290 1/18/2017
3.4.6 21,127 1/13/2017
3.4.3 7,062 8/26/2016
3.4.2 508 8/2/2016
3.4.1 433 7/22/2016
3.4.0 12,789 3/1/2016
3.3.14 6,794 12/16/2015
3.3.13 495 12/10/2015
3.3.12 4,743 12/8/2015
3.3.11 2,353 9/8/2015
3.3.10 1,090 8/14/2015
3.3.9 5,348 5/24/2015
3.3.8 909 4/15/2015
3.3.7 402 4/15/2015
3.3.6 1,229 3/19/2015
3.3.5 1,083 1/23/2015
3.3.4 405 1/22/2015
3.3.3 415 1/22/2015
3.3.2 393 1/19/2015
3.3.1 579 1/12/2015
3.3.0 516 1/10/2015
3.2.0 840 12/3/2014
3.1.1 675 10/29/2014
3.0.3 540 10/13/2014
3.0.2 1,067 9/8/2014
3.0.1.1 495 8/28/2014
3.0.0 558 8/21/2014
3.0.0-beta2 418 7/4/2014
3.0.0-beta 414 6/25/2014
2.1.0 2,313 6/15/2014
2.0.4 652 3/9/2014
2.0.3 7,258 4/16/2013
2.0.2 576 2/28/2013
2.0.1 573 2/3/2013
1.2.1 486 2/3/2013
1.1.1 552 12/29/2012
1.1.0 566 11/4/2012
1.0.6 625 8/12/2012
1.0.5 607 5/6/2012
1.0.3 1,029 5/29/2011
1.0.2 666 5/24/2011
1.0.1 750 5/1/2011
1.0.0 886 3/14/2011
Show less