是否有用PowerShell脚本测试PowerShell的单元测试框架?

问题描述:

我在寻找一个xUnit类型的单元测试框架,它允许我用PowerShell脚本测试PowerShell函数。是否有用PowerShell脚本测试PowerShell的单元测试框架?

+1

还有一个类似的问题:http://*.com/questions/940497/how-to-do-tdd-and-unit-testing-in-powershell – stej 2009-06-17 10:03:51

我还在Codeplex上找到了PSUnit。 PSUnit PowerShell Unit Testing Framework

有一些很酷的屏幕截图,预计今年8月发布。

虽然不是一个实际框架la xUnit,但Lee Holmes确实编写了an article about how to unit test PowerShell using PowerShell scripts

那么,只是为了完整性:实际上有PSUnit。虽然看起来并不是很成熟,但是从我看到的开始以来只有两个活动的高峰期,以及没有文件可言。

但是正如我从cuTest得知的那样,单元测试是适合非常小的空间的东西(至少对于C来说),所以有一些工作可能不需要太多的努力。

+0

看来PsUnit开始移动http:// www.codeplex.com/PSUnit – stej 2009-07-28 04:31:24

从项目页Pester

纠缠为运行单元测试执行和 验证在PowerShell PowerShell命令的框架。