在运行时创建测试
是否有任何 .NET 测试框架允许动态创建测试,而无需处理做作的属性语法?
类似的东西:
foreach (var t in tests)
{
TestFx.Run(t.Name, t.TestDelegate);
}
但是有了你所期望的测试报告......
我可以用 RowTests 等人做这样的事情,但这似乎很做作。
Are there any .NET testing frameworks which allow dynamic creation of tests without having to deal with a hokey Attribute syntax?
Something like:
foreach (var t in tests)
{
TestFx.Run(t.Name, t.TestDelegate);
}
But with the test reporting as you would expect...
I could do something like this with RowTests et al, but that seems hokey.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想知道 Pex 是否能满足您的需求......
I wonder if Pex would suite your needs...
我发现如何使用参数化测试来执行此操作。
http ://richarddingwall.name/2009/06/08/using-nunit-to-check-your-ioc-container-is-set-up-right/
I found out how i can use parameterized tests to sorta do this here.
http://richarddingwall.name/2009/06/08/using-nunit-to-check-your-ioc-container-is-set-up-right/