Visual Studio 2013 MSTest 与 NUnit [英] Visual Studio 2013 MSTest vs NUnit

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

问题描述

我的公司正在将我们的 Visual Studio 2012 升级到 2013 Premium.在此期间,我们还希望开始使用 Visual Studio Team Services 自动化我们的测试>

我过去读过一些 MSTest 与 nUnit 的帖子和文章,但其中大部分都比较了旧版本的 MSTest.此外,与 MSTest 相比,nUnit 获得了很多好评.

我的问题是,考虑到 Microsoft 对 ALM、敏捷实践以及他们添加到 VS2013 Premium 和 Visual Studio Team Services 中以促进和鼓励自动化测试的所有新内容的承诺,MSTest 与 nUnit 相比如何?

在决定要使用的测试框架之前,我还应该考虑哪些其他因素?

解决方案

MSTest 自最初推出以来并没有太大变化,因此那些旧的比较帖子仍然有效.Microsoft 对 ALM 的关注主要针对进一步的工具和服务器产品,但基本测试框架并没有太大变化.

还值得注意的是,MSTest 及其整个 ALM 策略针对许多不同风格的自动化测试,包括集成测试、系统测试、性能测试等,因此虽然它试图成为一种尺寸适合-总之,它非常不适合单元测试,因为它太繁重了.

虽然 NUnit 更好,但我也不推荐它.多年来,它也没有太大变化,而且可扩展性模型坦率地说是一团糟.

相反,我推荐 xUnit.net.尽管它也不完美,但它是目前 .NET 上最好的主流替代方案.xUnit.net优于MSTest的原因有很多.

My company is upgrading our Visual Studio 2012 to 2013 Premium. In the midst of this, we are also looking to start automating our tests using Visual Studio Team Services

I have read a couple of MSTest vs nUnit posts and articles in the past but most of it compares the older version of MSTest. Also, nUnit had a lot of favourable reviews as compared to MSTest.

My question is, considering Microsoft's commitment towards the ALM, Agile practices and all the new stuff they've added into VS2013 Premium and Visual Studio Team Services to facilitate and encourage automated testing, how does MSTest compare to nUnit?

What other considerations should I take before making a decision on a testing framework to use?

解决方案

MSTest hasn't changed much since it was originally introduced, so those old comparison posts are still valid. Microsoft's focus on ALM is mostly targeted at further tooling and server products, but the fundamental testing framework hasn't changed much.

It's also worth noticing that MSTest and their entire ALM strategy is targeted at many different styles of automated testing, including Integration Testing, System Testing, Performance Testing, etc., so while it attempts to be a one-size-fits-all, it's quite ill-suited for unit testing, because it's too heavy to work with.

While NUnit is better, I wouldn't recommend it either. It, too, hasn't changed much for years, and the extensibility model is frankly a mess.

Instead, I'd recommend xUnit.net. Although it's not perfect either, it's currently the best mainstream alternative on .NET. There are many reasons why xUnit.net is better than MSTest.

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

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