Visual Studio 2008 测试运行需要很长时间才能完成
我的解决方案中有很多测试项目。它们中的大多数会立即运行并立即完成。然而,一项工作需要很长时间才能完成。实际测试运行速度很快,但很长一段时间所有测试都通过后界面仍然显示“测试运行完成...”。测试运行最终在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能是一个长时间运行的 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.
可能是光盘 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?