16

I am lookin for a unit testing framework of type xUnit that lets me test PowerShell functions with PowerShell scripts.

tellingmachine
  • 1,067
  • 11
  • 23
  • 1
    There is a similar question: http://stackoverflow.com/questions/940497/how-to-do-tdd-and-unit-testing-in-powershell – stej Jun 17 '09 at 10:03

4 Answers4

7

Well, just for completeness: There is actually PSUnit. Doesn't seem to be very mature, though as I see only two spikes of activity since its beginning as well as no documentation to speak of.

But as I learnt from cuTest, unit testing is something that fits into a very small space (at least for C in that case), so having something that works might not require too much effort.

Joey
  • 344,408
  • 85
  • 689
  • 683
4

While not an actual framework a la xUnit, Lee Holmes did write an article about how to unit test PowerShell using PowerShell scripts.

luviktor
  • 2,240
  • 2
  • 22
  • 23
Lee
  • 18,529
  • 6
  • 58
  • 60
3

I also found PSUnit on Codeplex. PSUnit PowerShell Unit Testing Framework

There are some cool screen shots and a release is expected in August this year.

tellingmachine
  • 1,067
  • 11
  • 23
1

From the project page for Pester:

Pester provides a framework for running unit tests to execute and validate PowerShell commands from within PowerShell.

dharmatech
  • 8,979
  • 8
  • 42
  • 88