Nunit 与 MsTest 性能比较

发布于 2024-09-15 05:15:40 字数 102 浏览 2 评论 0原文

我试图找到关于 mstest(VS 2008)和 nunit(最新)性能的良好比较。

我只找到了有关功能的文章,没有找到有关执行时间的示例:/

我将不胜感激。

I'm trying to find good comparison about performance of mstest(VS 2008) and nunit(newest).

I have found only articles about features, not examples about times of execution :/

I would be grateful for help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝梦月影 2024-09-22 05:15:40

我有使用 MSTest 和 NUnit 的经验。根据我的经验,MSTest 比 NUnit 慢得多。测试的实际执行可能几乎相同,但是 MSTest 的设置和拆卸时间要长得多。

请注意,我已通过集成 VS GUI 运行 MSTest 单元测试,这可能就是它如此慢的原因(与轻量级 NUnit GUI 相比)。显然,您可以通过命令行运行 MSTest,这可能会缩短安装和拆卸时间。

但还有其他事情需要考虑。 MSTest 缺少 NUnit 所具有的一系列功能,而且 NUnit 存在的时间更长、更成熟。此外,NUnit 的错误修复速度比 MSTest 快得多(服务包发布的频率是多少?)。

此外,NUnit 无需 Visual Studio 即可运行,这意味着您可以在服务器上运行这些测试,而无需另一个 VS 许可证。我已经阅读了在没有 VS 的情况下运行 MSTest 的方法,但它涉及复制文件,这可能会或可能不会违反许可条款。

I have experience with using MSTest and NUnit. From my experience, MSTest is much slower than NUnit. The actual execution of tests may be almost the same, however, the setup and teardown time for MSTest is significantly more.

Note that I have run the MSTest unit tests through the integrated VS GUI, which is probably why it's so slow (compared to the light-weight NUnit GUI). Apparently you can run MSTest through the command line, which may improve the setup and teardown time.

There are other things to consider though. MSTest is missing a bunch of features that NUnit has and NUnit has been around longer is more mature. Also, bug fixes will arrive much faster with NUnit than MSTest (how often are service packs released?).

Also NUnit works without visual studio, which means you can run these tests on a server without needing another VS license. I have read ways to get MSTest running without VS, but it involves copying files, which may or may not violate the licensing terms.

一百个冬季 2024-09-22 05:15:40

测试运行器实际上做了很多事情 - 它必须找到所有测试类,然后在调用它们之前识别所有测试方法(可能通过反射,但也可能不是)。它还必须汇总并报告结果。所有这些都可以是高效的,也可以是其他的,因此性能可能会有明显的差异,尤其是在套件中进行大量测试的情况下。

The test runner actually does quite a lot - it has to find all your test classes, and then identify all the test methods before calling them (probably by means of reflection, but possibly not). It also has to assemble and report the results. All of these can be efficient or otherwise, so there could be a noticeable difference in performance especially with a large number of tests in the suite.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文