首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Nunit在运行测试套件时锁定

Nunit在运行测试套件时锁定
EN

Stack Overflow用户
提问于 2012-02-27 00:14:06
回答 1查看 1.4K关注 0票数 3

当我试图在NUnit中运行一个测试套件时,我遇到了一个问题。它在运行测试时锁定,然后显示此错误消息。我使用了最新版本的NUnit,并使用c#、Visual 2010和Selenium客户端驱动程序2.12编写了这个测试。

知道吗?

错误详细信息:

有关调用的详细信息,请参阅此消息的结尾。

只是实时(JIT)调试,而不是这个对话框。

*异常文本*

代码语言:javascript
复制
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:4829



    Server stack trace:



   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)

   at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)

   at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()

   at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()

   at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)

   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)

   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)

   at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)



Exception rethrown at [0]: 

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at NUnit.Core.TestRunner.get_Running()

   at NUnit.Core.ProxyTestRunner.get_Running()

   at NUnit.Util.TestLoader.get_Running()

   at NUnit.Gui.NUnitForm.get_IsTestRunning()

   at NUnit.Gui.NUnitForm.NUnitForm_Closing(Object sender, CancelEventArgs e)

   at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)

   at System.Windows.Forms.Form.WmClose(Message& m)

   at System.Windows.Forms.Form.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

*加载的程序集*

米斯尔利布

代码语言:javascript
复制
Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.3625 (GDR.050727-3600)

CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

单位

代码语言:javascript
复制
Assembly Version: 2.5.10.11092

Win32 Version: 2.5.10.11092

CodeBase: file:///C:/Program%20Files/NUnit%202.5.10/bin/net-2.0/nunit.exe

nunit-gui-runner

代码语言:javascript
复制
Assembly Version: 2.5.10.11092

Win32 Version: 2.5.10.11092

CodeBase: file:///C:/Program%20Files/NUnit%202.5.10/bin/net-2.0/lib/nunit-gui-runner.DLL

nunit.core

代码语言:javascript
复制
Assembly Version: 2.5.10.11092

Win32 Version: 2.5.10.11092

CodeBase: file:///C:/Program%20Files/NUnit%202.5.10/bin/net-2.0/lib/nunit.core.DLL

nunit.util

代码语言:javascript
复制
Assembly Version: 2.5.10.11092

Win32 Version: 2.5.10.11092

CodeBase: file:///C:/Program%20Files/NUnit%202.5.10/bin/net-2.0/lib/nunit.util.DLL

nunit.uikit

代码语言:javascript
复制
Assembly Version: 2.5.10.11092

Win32 Version: 2.5.10.11092

CodeBase: file:///C:/Program%20Files/NUnit%202.5.10/bin/net-2.0/lib/nunit.uikit.DLL

System.Windows.Forms

代码语言:javascript
复制
Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.3623 (GDR.050727-3600)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

系统

代码语言:javascript
复制
Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.3624 (GDR.050727-3600)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

System.Drawing

代码语言:javascript
复制
Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

nunit.core.interfaces

代码语言:javascript
复制
Assembly Version: 2.5.10.11092

Win32 Version: 2.5.10.11092

CodeBase: file:///C:/Program%20Files/NUnit%202.5.10/bin/net-2.0/lib/nunit.core.interfaces.DLL

System.Configuration

代码语言:javascript
复制
Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml

代码语言:javascript
复制
Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.3082 (QFE.050727-3000)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

System.Runtime.Remoting

代码语言:javascript
复制
Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

nunit.uiexception

代码语言:javascript
复制
Assembly Version: 2.5.10.11092

Win32 Version: 2.5.10.11092

CodeBase: file:///C:/Program%20Files/NUnit%202.5.10/bin/net-2.0/lib/nunit.uiexception.DLL

System.Web

代码语言:javascript
复制
Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.3618 (GDR.050727-3600)

CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll

cdqzko4t

代码语言:javascript
复制
Assembly Version: 2.5.10.11092

Win32 Version: 2.0.50727.3624 (GDR.050727-3600)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

* JIT调试*

若要启用即时调试(JIT),请使用此.config文件。

应用程序或计算机(machine.config)必须具有

jitDebugging值在system.windows.forms部分中设置。

还必须通过调试来编译应用程序。

已启用。

例如:

代码语言:javascript
复制
<system.windows.forms jitDebugging="true" />

启用JIT调试时,任何未处理的异常

将被发送到在计算机上注册的JIT调试器。

而不是由此对话框处理。

EN

回答 1

Stack Overflow用户

发布于 2015-11-27 08:37:24

我也遇到了同样的问题,但是我通过创建一个新的NUnit项目和重新加载程序集来修复它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9458606

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档