0

I am testing desktop application and running UI test on CI pipeline. This error occurs randomly:

TearDown : OpenQA.Selenium.WebDriverException : 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:4723 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) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo) at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.Appium.Service.AppiumCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)

Using Visual Studio Test Platform Installer "Microsoft.TestPlatform 17.5.0" to run tests on VM. Below are my nugget resources

<NuGetSource Name="Microsoft.CodeCoverage" Version=" 17.4.0" />
<NuGetSource Name="NUnit3TestAdapter" Version="3.17.0" />
<NuGetSource Name="NUnit" Version="3.13.3" />
<NuGetSource Name="Appium.WebDriver" Version="4.4.0" />
<NuGetSource Name="Selenium.WebDriver" Version="3.141.0" />

Listening on port "http://127.0.0.1:4723" WinAppDriver version 1.1.3

On local machine everything works smooth, this error comes when I try to run tests on VM. I checked VM resources like CPU, RAM, and disk space, all okay. Developer mode is enabled on windows 10.

anonymous
  • 1
  • 1

0 Answers0