9

我有一个VS2012/.NET4.5的解决方案与单位的大量测试QTAgent32.exe已停止工作

当从溶液中运行的所有单元测试,我随机得到“QTAgent32.exe已停止工作”的错误信息单元测试在这一点上是悬而未决的。

我的单元测试实际上是MSTest,我使用VS的Resharper菜单运行它们。 Resharper Edition是7.1.3,不知道它是否重要。 VS 2012 SP 3

回答

7

最后找到的代码

连体错误写入的,并且在某些curcumstances造成无端递归和堆栈溢出的原因。所以,如果你得到相同的错误“QTAgent32.exe已停止工作”尝试检查此时你的调用stak。

+0

谢谢:)同一个这里 –

4

我有一个类似的问题,所以我会提出解决方案在这里为其他人有同样的问题。

无论何时试图运行任何单元测试,我都会得到“QTAgent32.exe已停止工作”。这是在我通过将一些代码拉入类库来重新组织我的解决方案之后开始的。

这是在VS 2012高级版在.NET 3.5的解决方案,更新4

到底此修复程序是删除锁文件。 (顺便提一下,这是一个隐藏文件。)

+1

这解决了这个问题暂时,但它又回来了。我咬紧牙关,转向xUnit.net,它有自己的测试跑步者。 (这意味着不使用QTAgent。)我花了一天的时间来移植我所有的588测试。现在一切正常。 –

0

重新启动我的电脑后,运行Visual Studio Professional 2013 Update 2时发生了同样的事情。即使是最简单的测试在输入之前失败了,并且消息“QTAgent32.exe has停止工作“出现了。

以管理员身份运行Visual Studio为我解决了这个问题。可能只是消除症状不是原因,但它的工作。

2

FWIW:我在VS2012中的解决方案是在solutions目录中删除我的TraceAndTestImpact.testsettings文件。 (可能与消除MySolutionName.sln.DotSettings.user与提升的权限运行起来)

如果你得到下面,

An exception occurred while test discoverer 'MSTestDiscoverer' was loading tests. 
Exception: An error occurred while initializing the settings provider named 'MSTest'. 
Error: The test settings file C:\....\TraceAndTestImpact.testsettings, specified in 
the MSTestAdapter settings, is not available. Either access to the file is denied or 
the file does not exist. Ensure that the test settings file is available and try again. 

尝试加载使用提升的权限解决方案。为了增加伤害,不会创建新的TraceAndTestImpact.testsettings文件。

1

我有同样的问题,并且问题是在ThreadPool.QueueUserWorkItem内有Thread.Sleep的一些测试。

我发现删除测试配置文件后发生错误的位置:my-project.testsettings。删除此文件已停止QTAgent32.exe已停止工作消息并开始显示有关正在中止的线程的异常。