NUnit 和 Visual Web Developer 2008SP1 - 集成问题
我决定将 NUnit 与 VWD2008 集成。
我做了以下事情—— 1) 安装了 NUnit - 运行了一个示例项目,该项目包含在安装中,所有测试都很好。 2) 安装 TestDriven.Net 2.0 - 个人发行版。 3)我在 MVC 项目上编写了一个测试,当我尝试右键单击上下文并运行测试时,它失败了。 此外,我必须添加 NUnit.framework dll 的引用才能编写测试。
我做错了什么?
I've decided to integrate NUnit with VWD2008.
I did the following-
1) Installed NUnit - Ran a Sample project that was included with the installation all the tests were fine.
2) Installed TestDriven.Net 2.0 - Personal distribution.
3) I have written on an MVC Project a test and when I try to right click the context and run the Test it fails.
In addition I had to add reference the NUnit.framework dll in order to write the tests.
What have I done wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Testdriven.Net 不适用于 Visual Studio 的 Express 版本。 Testdriven.Net 的早期版本确实可以与 Visual Studio Express 版本一起使用,但 Microsoft 不喜欢这一点,并聘请了他们的律师。
http://weblogs.asp。 net/nunitaddin/archive/2007/07/06/microsoft-amp-testdriven-net.aspx
如果您想要一个带有单元测试支持的免费IDE,您可以尝试sharpdevelop。
Testdriven.Net doesn't work with the express editions of visual studio. Previous versions of Testdriven.Net did work with the Visual Studio Express editions but Microsoft didn't like that and put their lawyers on it.
http://weblogs.asp.net/nunitaddin/archive/2007/07/06/microsoft-amp-testdriven-net.aspx
You could try sharpdevelop if you want a free ide with unit-testing support.
正如 Mendelt 所说,TestDriven.Net 不适用于 Express 版本。 我有 VS2008 标准版,所以我不得不使用 NUnit 的“漫长之路”。 您已打开 NUnit GUI 并加载 dll。 然后,从 VS2008 中的“调试”菜单附加到该进程并运行代码。
话虽如此,我不确定 MVC 是否相同。 我知道在我读过的几篇博客中,都有 MVC 的嘲笑示例。 也许你应该研究一下。
Like Mendelt said, TestDriven.Net doesn't work with the express editions. I've got VS2008 Standard Edition so I had to use the "long way" of using NUnit. You have the NUnit GUI open and load your dlls. Then you attach to that process from the Debug menu in VS2008 and run your code.
All that being said, I'm not sure if it is the same for MVC or not. I know in the few blogs I've read, there have all been examples of mocking for MVC. Perhaps something you should look into.