0
私のソリューション内のテストプロジェクトにはセレンテストがあり、Visual Studio内で正常に動作します。しかし、コードをチェックインして、私の継続的な統合ビルド・プロファイルの一部として実行すると、失敗します。チームサービスとのセレン継続的インテグレーション
セットアップの簡単な説明: 1)ビルドエージェントサーバーにコードがチェックされています。
2)プロジェクトがビルドされ、サーバー2(ビルドサーバーからリモート)に展開されます。
3)ユニットテストが実行されます。ここで
は、例えばユニットテストです:
public void Login_InvalidAccessUrl_ShowMesage()
{
driver = new ChromeDriver();
driver.Manage().Window.Maximize();
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
driver.Navigate().GoToUrl("https://testsite.company.com/Login");
IWebElement el = driver.FindElementById("invalidAccessUrlSection");
Assert.AreNotEqual(el, null);
}
これは、Visual Studioから美しく動作しますが、CIは、同じテストを実行したときに、私は次の取得:
Error Message:
Test method eNotify.Staff.Tests.SeleniumTests.Login_InvalidAccessUrl_ShowMesage threw exception:
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:11570/session timed out after 60 seconds. ---> System.Net.WebException: The operation has timed out
TestCleanup method eNotify.Staff.Tests.SeleniumTests.Dispose threw exception. System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object..
Stack Trace:
at System.Net.HttpWebRequest.GetResponse()
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
--- End of inner exception stack trace ---
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor()
at eNotify.Staff.Tests.SeleniumTests.Login_InvalidAccessUrl_ShowMesage()
TestCleanup Stack Trace
at eNotify.Staff.Tests.SeleniumTests.Dispose()
私は運転手をしないのですまたはいくつかのソフトウェア?私が知る限り、ポート11570でリッスンするものはありません。
ありがとうございました。それはすべてがうまくいったサンドボックスの引数でした。 –