C#.NET 4.0测试框架? [英] C# .NET 4.0 Testing Framework?

查看:139
本文介绍了C#.NET 4.0测试框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我没有记错,NUnit的是事实上的标准单元测试,但我刚刚下载了它,写了一个简单的测试,然后显然我要火起来的GUI和加载我的.exe 组装,这根本没有。

If I'm not mistaken, NUnit is the de-facto standard for unit testing, but I've just downloaded it, wrote a simple test, and then apparently I have to fire up the GUI and load my .exe assembly, which simply failed.

我想编辑

C:\Program Files (x86)\NUnit 2.5.7\bin\net-2.0\nunit.exe.config

由于在这个问题建议,但没有任何工作,所以我试图下载NUnit的源$ C ​​$ c和编译它在VS2010,但它甚至不编译。说 punit.framework.dll 找不到。 的解决方案说不包含定义AllTestsExecuted,所以我开始有点沮丧这里。你会认为会有一个易于使用和 - 获得运行框架.NET 4,不是吗?

As suggested in this question, but that didn't work either, so I tried downloading the nunit source code and compiling it in vs2010, but it doesn't even compile. Says punit.framework.dll could not be found. That solution says "does not contain a definition for AllTestsExecuted", so I'm getting a little frustrated here. You'd think there would be an easy-to-use-and-get-running framework for .net 4, no?

所以我的问题是,我怎么要么得到NUnit的工作,或者是有其他的框架,这将导致我少痛苦?

So my question is, how do I either get NUnit working, or is there another framework that will cause me less agony?

推荐答案

您不必使用NUnit的图形用户界面来运行测试。您可以使用 TestDriven.NET 在Visual Studio中。另外,如果你碰巧使用ReSharper的,有一个单元测试运行它与NUnit的作品也。

You don't have to use the NUnit GUI to run your tests. You can use TestDriven.NET from within Visual Studio. Also, if you happen to be using Resharper, that has a unit test runner which works with NUnit also.

这篇关于C#.NET 4.0测试框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆