最好的 Nunit 测试运行程序是什么?

发布于 2024-07-09 21:18:28 字数 1449 浏览 9 评论 0原文

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

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

发布评论

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

评论(7

箜明 2024-07-16 21:18:28

我一直是 TestDriven.NET 的粉丝,与使用 ReSharper 相比,我更喜欢它。

I've always been a fan of TestDriven.NET, I much prefer it over using ReSharper.

舂唻埖巳落 2024-07-16 21:18:28

Resharper 确实有一些缺点...但可以将其配置为执行您想要的操作...

您可以在 Visual Studio 中配置键盘选项。 此外,您还可以使用 Resharper 中的单元测试资源管理器来查找所需的测试并将其添加到当前会话中。 我通常配置一个快捷方式(Alt+U)来运行当前会话中的所有测试......这样,当我开发时,我可以在几秒钟内运行我需要的所有单元测试。

另请查看:

不过,如果不必手动配置,那就太好了! (是的!我正在看你们 Resharper 开发团队!哈哈)

Resharper does have some shortcomings...but it is possible to configure it to do what you want...

You can configure keyboard options in Visual Studio. Also, you can use the Unit Test Explorer in Resharper to find the tests you want and add them to the current session. I usually configure a shortcut (Alt+U) that runs all the tests in my current session...that way as I'm developing I can run all of the unit tests I need in seconds.

Also check out:

However, it would be nice if this didn't have to be manually configured! (Yes! I'm looking at you Resharper Dev team! LOL)

爱的十字路口 2024-07-16 21:18:28

我使用 NUnit 附带的单独的 NUnit GUI。 缺点是你必须使用 alt-tab 来切换它,但我喜欢屏幕上有一个宽大的绿色/红色条的视觉反馈,并且可以很好地概述树视图中的所有测试。

您可以将其设置为在检测到程序集已更改时重新运行上次测试运行,因此它确实不会因为它未集成到 Visual Studio 而减慢您的速度。

I use the separate NUnit GUI, that is shipped with NUnit. The down side is that you have to alt-tab to it, but I like the visual feedback of having a fat green/red bar across my screen, and having a good overview of all the tests in the treeview.

You can set it to rerun the last test run when it detects that the assembly was changed, so then it really does not slow you down that it is not integrated into Visual Studio.

☆獨立☆ 2024-07-16 21:18:28

Gallio Icarus 是一个比 nUnit 中包含的测试运行器好看得多的测试运行器。 它运行 nUnit 测试,因此值得一看。

Gallio Icarus is a much better looking test runner than the one included with nUnit. It runs nUnit tests, so it's worth a look.

川水往事 2024-07-16 21:18:28

我曾经使用 TestDriven.Net,恕我直言,它是最好的跑步者,但最近 NCrunch 是我的新工具最喜欢单元测试。

当您编码时,NCrunch 在后台(有选择地)运行所有测试。 它是 TDD 的一个很棒的工具,在代码破解时几乎可以立即得到反馈。 它还提供代码覆盖率数据和性能指标,无需您付出任何努力(但需要您的处理器的投入......)。

我仍然使用 TestDriven.Net 进行大量集成测试(因为我通常在 NCrunch 中禁用它们)和特定任务,因此对于 TDD 从业者来说,使用这两个运行器是一个很好的组合。

I used to work with TestDriven.Net, which is IMHO the best runner out there, but lately NCrunch is my new favorite for unit testing.

NCrunch runs (selectively) all your tests in the background, as you code. It is a great tool for TDDing, with almost instant feedback upon code breaking. It also provides code coverage data, and performance metrics, with no effort on your part (but with your processor's devotion...).

I still use TestDriven.Net for heavy integration tests (as I usually disable them in NCrunch), and specific tasks, so using both runners is a great combination for the TDD practitioner.

青巷忧颜 2024-07-16 21:18:28

总的来说,我喜欢 NUnit GUI,但目前有一些烦恼:

  • 运行测试后自动扩展装置
  • 双击测试会清除同行测试的结果

我也非常喜欢 DevExpress Test Runner,但它会重建我的测试结果运行测试之前的项目。 这在小型系统中不会是问题,但当您有近 60 个项目时,等待的时间就不长了。

Overall I like the NUnit GUI but there are some annoyances I currently live with:

  • auto-expansion of fixtures after running a test
  • double-clicking a test clears the results of the peer tests

I also very much like the DevExpress Test Runner but it rebuilds my projects before running the tests. This wouldn't be a problem in a small system but when you have nearly 60 projects it's no small wait.

苦行僧 2024-07-16 21:18:28

Resharper 和我认为有捷径,但它确实有一些缺点。 就像 TestMatrix 那样的测试覆盖率。 但无论如何,生活并不完美。

顺便说一句,TestMatrix 似乎已经死了。

Resharper and I think there are shortcuts, but yes it has some shortcomings. Like no testcoverage like TestMatrix has. But then life is not perfect anyway.

TestMatrix seems to b dead BTW.

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