Visual Studio 2008 测试运行需要很长时间才能完成

发布于 2024-08-16 02:26:15 字数 155 浏览 1 评论 0原文

我的解决方案中有很多测试项目。它们中的大多数会立即运行并立即完成。然而,一项工作需要很长时间才能完成。实际测试运行速度很快,但很长一段时间所有测试都通过后界面仍然显示“测试运行完成...”。测试运行最终在 10-20 秒后完成。有没有人遇到过这个问题或者知道代码的哪些特定方面可能会导致这个问题?

I have a bunch of test projects in my solution. Most of them run instantly and finish instantly. One however takes a long time to complete. The actual tests run fast, but for a long period after all the tests have passed the interface still says "Test Run Completing...". The test run eventually finishes after 10-20 seconds. Has anyone experiences this problem or have any idea what particular aspect of code might cause this?

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

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

发布评论

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

评论(2

橘亓 2024-08-23 02:26:15

可能是一个长时间运行的 Teardown(在 NUnit 中,TestFixtureTearDown - 不确定它在 mstest 中是否完全相同)?这将在所有测试完成后运行,并可能进行一些耗时的清理工作。这可以解释为什么所有测试都通过了,它似乎仍然在做一些事情,并且将是我要检查的第一件事。

Could be a long-running Teardown (in NUnit, TestFixtureTearDown - not sure if it's exactly the same in mstest)? That would run after all tests have finished and could doing some time-intensive clean up. That would explain why all tests have passed by it still appears to be doing something and would be the first thing I would check.

浅笑依然 2024-08-23 02:26:15

可能是光盘 I/O 问题。测试运行会将结果写入多个文件。您是否将这些配置为位于缓慢/难以访问的驱动器上?

Could be a disc I/O problem. The test run will write the results to a number of files. Have you configured these to be on a slow / hard to reach drive?

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