Visual Studio MSTest 运行甚至无法启动

发布于 2024-07-07 05:20:50 字数 473 浏览 4 评论 0原文

我已经使用 Visual Studio 2005 的内置单元测试功能构建了一堆单元测试。 在过去的一小段时间里,开始测试绝对需要永远...所有内容都处于“待处理”状态两分钟或更长时间。 现在,Visual Studio 决定将事情提升到一个新的水平,甚至不再开始测试。 两到三分钟后,它会中止运行,并向日志中添加一条错误消息:

Failed to Queue Test Run '(blahblahblah)' with id {bfba05b1-afe5-499e-b452-29167f414f0f}: Microsoft.VisualStudio.TestTools.TestManagement .ExecutionException:无法建立本地运行的通信环境。

有人有主意吗? 从中期来看,我们计划切换到 NUnit,但目前我更愿意坚持使用 Visual Studio,因为团队的其他成员已经安装了该软件,这使得说服他们实际运行测试变得更容易。 ;-)

I've got a bunch of unit tests built using Visual Studio 2005's built-in unit testing functionality. For the last little while, it's been taking absolutely forever to start the tests... Everything just sits there at "Pending" for two minutes or more. Now Visual Studio's decided to take things to a new level and never even start the tests. After two to three minutes, it aborts the run and barfs an error message into the log:

Failed to Queue Test Run '(blahblahblah)' with id {bfba05b1-afe5-499e-b452-29167f414f0f}: Microsoft.VisualStudio.TestTools.TestManagement.ExecutionException: Failed to establish communication environment for local run.

Anyone have any ideas? In the medium term, we are planning to switch to NUnit, but for now I'd prefer to stick to Visual Studio because the rest of the team already has that installed and that makes it easier to convince them to actually run the tests... ;-)

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

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

发布评论

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

评论(3

丶情人眼里出诗心の 2024-07-14 05:20:50

您的计算机名称是大写吗? 将其更改为小写并重试。

Is your computer name UPPERCASE? change it to lower case and try it again.

岁吢 2024-07-14 05:20:50

我遇到过这个问题。 然而,对我来说,答案是将我的机器名称从全部小写更改为全部大写。

这方面的一些参考...
http://teamfoundation.blogspot.com/ 2008/12/case-of-never-ending-unit-tests.html
http://social .msdn.microsoft.com/Forums/en-US/vststest/thread/fd6f2128-e248-4336-b8be-1eb5480e3de8/

请注意,如果您只是更改计算机名称的大小写,那么您将需要使用注册表方法更改名称,因为当对话框看到类似名称时,“确定”按钮将变灰。

I've experienced this problem. However, for me the answer was to change my machine name from all lowercase to all UPPERCASE.

Some references for this...
http://teamfoundation.blogspot.com/2008/12/case-of-never-ending-unit-tests.html
http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/fd6f2128-e248-4336-b8be-1eb5480e3de8/

Note, that if you're just changing the case of the machine name then you'll need to use the registry method of changing name as the dialog box will grey-out the OK button when it sees what looks like the same name.

情深已缘浅 2024-07-14 05:20:50

我想说的是,这个 MS TEST 不是专业产品,应尽可能避免。 如果您想使用一个好的测试框架,那么将 MBUnit 与 TestDriven.NET 结合使用。 MBUnit 附带了许多新属性,包括 RollBack 和 RowTest 、 Row。

此外,TestDriven.NET 还允许您调试单元测试(这有多酷)。 您还可以从 TestDriven.NET 运行代码覆盖率,它会显示测试覆盖了多少代码。

尝试一下我相信你会喜欢它。

PS:它是免费的

Let me say this MS TEST is not a professional product and should be avoided whenever possible. If you want to use a good testing framework then use MBUnit with TestDriven.NET. MBUnit comes with many new attributes including RollBack and RowTest , Row.

Also, TestDriven.NET will allow you to debug your unit tests (How cool is that). You can also run the code coverage from TestDriven.NET which shows you how much of your code is covered under tests.

Give it a try I am sure you like it.

PS: IT is FREEE

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