VS 2010 Test Runner错误“正在运行测试时,代理进程已停止." [英] VS 2010 Test Runner error "The agent process was stopped while the test was running."

查看:89
本文介绍了VS 2010 Test Runner错误“正在运行测试时,代理进程已停止."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2010中,我有许多单元测试.当我一次使用测试列表运行多个测试时,有时会针对一个或多个测试显示以下错误:

In Visual Studio 2010, I have a number of unit tests. When I run multiple tests at one time using test lists, I sometimes reveive the following error for one or more of the tests:

代理程序进程已停止,而 测试正在运行.

The agent process was stopped while the test was running.

永远不会有同一项测试失败,并且如果我再次尝试运行测试,它将成功.

It is never the same test failing, and if I try to run the test again, it succeeds.

我发现了这个关于Connect的错误报告,这似乎是相同的问题,但没有提供解决方案.

I found this bug report on Connect, which seems to be the same problem, but it does not offer a solution.

有没有其他人看到过这种行为?我该如何避免呢?

Has anyone else seen this behaviour ? How I can avoid it ?

我仍然遇到此错误,同一软件/硬件设置的许多同事也是如此.到目前为止,我已经评估了答案,但是它们并不能解决问题.我开始为解决这个问题提供悬赏.

I am still experiencing this bug, and so is many of my colleagues on the same software/hardware setup. I have evaluated the answers so far, but they don't resolve the problem. I am starting a bounty for a solution to this problem.

推荐答案

我刚刚遇到了类似的问题:有些测试失败,并且在不同的测试运行中它们是不同的.我不知道发生这种情况的确切原因,但是当我向一个类中添加了终结器时,它才开始发生.当我禁用终结器时,问题消失了.当我打开finalizer时,问题又回来了.

I've just experienced the similar problem: some tests fail and they are different in different test runs. I don't know exactly the reason why it happens, but it began to occur when I added a finalizer to one of my classes. When I disable the finalizer - the problem disappears. When I turn the finalizer on - the problem comes back.

现在我不知道该如何克服.

Right now I don't know how to overcome this.

这篇关于VS 2010 Test Runner错误“正在运行测试时,代理进程已停止."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆