NUnit 与 Visual Studio 2008 的单元测试测试项目 [英] NUnit vs. Visual Studio 2008's test projects for unit testing

查看:32
本文介绍了NUnit 与 Visual Studio 2008 的单元测试测试项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将在工作中启动一个新项目并想进行单元测试.我们将使用 Visual Studio 2008、C# 和 ASP.NET MVC 的东西.我正在考虑使用 NUnit 或 Visual Studio 2008 的内置测试项目,但我愿意研究其他建议.一个系统是否比另一个更好,或者比另一个更易于使用/理解?

I am going to be starting up a new project at work and want to get into unit testing. We will be using Visual Studio 2008, C#, and the ASP.NET MVC stuff. I am looking at using either NUnit or the built-in test projects that Visual Studio 2008 has, but I am open to researching other suggestions. Is one system better than the other or perhaps easier to use/understand than the other?

我希望将此项目设置为某种最佳实践";为我们未来的发展努力.

I am looking to get this project set up as kind of the "best practice" for our development efforts going forward.

推荐答案

Daok 命名了 Visual Studio 2008 测试项目的所有专业人士.这是 NUnit 的专家.

Daok named all the pro's of Visual Studio 2008 test projects. Here are the pro's of NUnit.

  • NUnit 有一个模拟框架.
  • NUnit 可以在集成开发环境.如果您愿意,这可能很有用在非 Microsoft 构建服务器上运行测试,像 CruiseControl.NET.
  • NUnit 有更多版本发布比视觉工作室.你没有等待多年的新版本.而且您不必安装新版本的 IDE 即可获取新功能.
  • 正在开发扩展用于 NUnit,如行测试等.
  • Visual Studio 测试需要很长时间出于某种原因启动.这是在 Visual Studio 2008 中更好,但还是太慢了我的口味.快速运行测试看看你有没有打破什么东西可能需要很长时间.NUnit 与像 Testdriven.Net 一样运行来自 IDE 的测试实际上很多快点.尤其是跑步的时候单项测试.根据 Kjetil Klaussen 的说法,这是由 Visual Studio 测试运行程序引起的.在 TestDriven.Net 中运行 MSTest 测试使 MSTest 性能与 NUnit 相当.

这篇关于NUnit 与 Visual Studio 2008 的单元测试测试项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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