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

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

问题描述

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

过去,我已经阅读了几篇MSTest vs nUnit的文章和文章,但是大多数文章都比较了旧版本的MSTest.此外,与MSTest相比,nUnit受到很多好评.

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

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

解决方案

MSTest 自最初引入以来并没有太大变化,因此那些旧的比较文章仍然有效.微软对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天全站免登陆