Windows で Jenkins からテストを実行しています。一度に 1 つしか実行されていないときに正常に動作するテストでは、複数のジョブが別々のビルド スレッドで同時に実行されているときにエラーが発生します。Watir webdriver を使用しています。ブラウザの作成には、次のコードを使用しています。
profile = Selenium::WebDriver::Chrome::Profile.new
browser = Watir::Browser.new :chrome, :profile => profile, :http_client=>client
テストは Ruby と Cucumber で記述されており、タグを使用して各ジョブでテストのサブセットを実行しています。テストは、「Windows バッチ コマンドの実行」からキュウリで実行されます。デスクトップで 2 つのコマンド ライン インスタンスを開き、ジョブを並行して実行すると問題なく動作します。
いくつかの異なるエラーが再発するようです。1つは次のとおりです。
[0412/111507:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends
[0412/111552:ERROR:proxy_launcher.cc(114)] WaitForInitialLoads failed.
[0412/111552:ERROR:proxy_launcher.cc(556)] Failed to ConnectToRunningBrowser
[0412/111552:ERROR:automation_proxy.cc(319)] Channel error in AutomationProxy.
[0412/111552:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends
[0412/111552:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends
Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: C:\Users\steve\AppData\Local\Google\Chrome\Application\chrome.exe (Selenium::WebDriver::Error::UnknownError)
もう一つは
No connection could be made because the target machine actively refused it. - connect(2) (Errno::ECONNREFUSED)
Jenkins 経由ではなく、デスクトップのコマンド ライン経由で動作する実行例は次のとおりです。
cucumber --tags @event_discounts ENVIRONMENT=beta
と
cucumber --tags @WhiteList ENVIRONMENT=BETA
これを解決する方法について何か提案はありますか?