为什么 Visual Studio 中的测试视图如此慢?

发布于 2024-12-10 06:18:14 字数 424 浏览 1 评论 0原文

我有 VS 2010 Ultimate,带有 ReSharper、Reflector 和 SpecFlow 扩展。我在我的一个测试项目中使用 SpecFlow 以及 WebDriver 进行自动化 UI 测试。我现在正在该项目中处理大约 400 个单独的测试场景。

当我打开 Visual Studio 时,一切都很好(除了 ReSharper 带来的一些常见的同步缓慢问题)。然而,一旦我单击选项卡以显示内置的“测试视图”,VS 在测试加载时就会冻结大约 60 秒。

我担心随着我们对 SpecFlow 项目进行更多测试,情况会变得更糟。我可以在 TestSettings 文件中更改任何内容以使此过程更快吗?我应该尝试完全放弃 TestSettings 文件,还是这根本不可能?或者,我应该从使用带有 SpecFlow 的 MSTest 切换到使用 NUnit 等其他工具,以使测试视图缓慢消失吗?

I have VS 2010 Ultimate with ReSharper, Reflector, and SpecFlow extensions. I use SpecFlow in one of my test projects along with WebDriver for automated UI testing. I am now approaching about 400 individual test scenarios in that project.

When I open Visual Studio, everything is fine (aside from some of the usual synchronizing slowness that comes with ReSharper). However as soon as I click the tab to show my built-in "Test View", VS freezes up for about 60 seconds while the tests load.

I'm concerned this is going to get worse as we put more tests into the SpecFlow project. Is there anything I can change in my TestSettings file to make this go faster? Should I try and ditch the TestSettings file altogether, or is this not even possible? Or, should I switch from using MSTest with SpecFlow to something else like NUnit, to make the Test View slowness go away?

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

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

发布评论

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

评论(1

瑶笙 2024-12-17 06:18:14

花了我一晚上的时间,但我想通了。我有以下项目&命名空间:

MyCompany.MyApp (proj dll)
MyCompany.MyApp (proj namespace)

MyCompany.MyApp.UnitTest (proj dll)
MyCompany.MyApp (proj namespace)

MyCompany.MyApp.WebTest (proj dll)
MyCompany.MyApp (proj namespace)

specflow / webdriver 项目是“WebTest”项目。通过将项目的默认命名空间从“MyCompany.MyApp”更改为“MyCompany.MyApp.WebTest”,并更新所有文件的命名空间以与之匹配,测试视图现在可在 3 秒内加载。

希望这对某人有帮助。测试视图必须尝试解决测试项目和应用程序项目之间的某种命名空间冲突。

Took me all damn night but I figured it out. I had the following projects & namespaces:

MyCompany.MyApp (proj dll)
MyCompany.MyApp (proj namespace)

MyCompany.MyApp.UnitTest (proj dll)
MyCompany.MyApp (proj namespace)

MyCompany.MyApp.WebTest (proj dll)
MyCompany.MyApp (proj namespace)

The specflow / webdriver project was the "WebTest" project. By changing the project's default namespace from "MyCompany.MyApp" to "MyCompany.MyApp.WebTest", and updating the namespaces of all files to match this, the test view now loads in 3 seconds.

Hope this helps someone. The Test View must have been trying to solve some kind of namespace conflict between the test project and the app project.

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