[英]Unable to execute NUnit Selenium tests through Jenkins - target machine actively refused connection
I am trying to execute Selenium tests written in C#.NET with NUnit through Jenkins, but the following error message is displayed: 我正在尝试通过Jenkins用NUnit执行用C#.NET编写的Selenium测试,但是显示以下错误消息:
-> error: Unexpected error. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:13748 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
My build configuration in Jenkins is as follows: 我在Jenkins中的构建配置如下:
The solution appears to build successfully, but again, upon executing the tests I receive the above error message. 解决方案似乎可以成功构建,但是再次执行测试后,我收到了以上错误消息。
Note: I've checked my firewall settings and Jenkins is allowed through the firewall. 注意:我已经检查了防火墙设置,并允许Jenkins通过防火墙。
Any feedback would be greatly appreciated. 任何反馈将不胜感激。
Selenium was instaniated before the test run (BeforeTestRun). 在测试运行之前(BeforeTestRun)实例化了硒。 This meant any subsequent test executed after the first one would have no reference to the instance of the WebDriver, as it was not re-instantiated at the start of a scenario. 这意味着在第一个测试之后执行的任何后续测试都不会引用WebDriver实例,因为在场景开始时并未重新实例化它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.