Project Description
PSUnit is a lightweight Unit Testing framework for PowerShell script developers. It is completely written in PowerShell.

Follow me on Twitter for the latest updates on PSUnit: http://twitter.com/psunit
Source code is actively maintained on github https://github.com/tellingmachine/PSUnit
Codeplex is still the official PSUnit site!

IMPORTANT UPDATE: To cover PowerShell V3 in depth the new Release target date is now set to: 6/30/2013

Here is a list of improvements that are planned for the next release:

Recent Blog Posts
Unit Tests Example: http://www.tellingmachine.com/post/2009/07/The-very-first-PSUnit-Pilot-is-testing-the-PowerShell-7ce7c-Tie-Fighter-aka-Get-Enumerator-Cmdlet.aspx
Installation Guide: http://www.tellingmachine.com/post/2009/08/PSUnit-PowerShell-Unit-Testing-Framework-ndash3b-Getting-Started-Guide-ndash3b-Version-2-Beta-1.aspx
Writing Unit Tests: http://www.tellingmachine.com/post/2009/08/PSUnit-PowerShell-Unit-Testing-Framework-ndash3b-Getting-Started-Guide-ndash3b-Writing-Unit-Tests-ndash3b-Version-2-Beta-1.aspx
Running Unit Tests: http://www.tellingmachine.com/post/2009/08/PSUnit-PowerShell-Unit-Testing-Framework-ndash3b-Getting-Started-Guide-ndash3b-Running-Unit-Tests-ndash3b-Version-2-Beta-1.aspx


Helpful Wiki Content
Dokumentation Video Tutorials Screen Shots

PSUnit 2.0 Beta has been released on August 6th 2009.

Here is a screen shot of a PSUnit test run in the PowerShell ISE (CTP 3)

PSUnitSneakPeek800.jpg

Here is a screen shot of a HTML PSUnit test report that gets automatically generated after the test run.

PSUnitTestResultReport800.JPG

Here are some details about PSUnit:

Definition of a PowerShell unit test:
A PSUnit unit test is a script that calls the script function being tested and checks some assumptions about the logical behavior of that function. It can be written easily and runs fast. Unit tests written with PSUnit will run automatically and are trustworthy, readable and maintainable. PSUnit unit tests can be executed repeatedly by anyone who has the PowerShell runtime installed.

Features
Test function naming convention
The name of a test function should adhere to the following naming convention:

[Function Name]__[Should ... ExpectedBehavior]_[If ... StateUnderTest]

For example: Get-Enumerator_ShouldReturnIEnumerable_IfHashTableIsPassedIn