2012-02-29 12 views
1

Seleniumグリッドからantターゲットを実行すると、すべてのターゲットを並行して起動できます。実行終了前にFirefoxセッションを終了した場合私は得る:Selenium Grid:セッションを開始できませんでしたセッション:新しいセッションの転送エラーセットアップのためのVMの空のプール

ERROR Server Exception: sessionId fc89c194951a4790bce8418dac7d5ceb doesn't exist; 
    perhaps this session was already stopped? 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91) 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:262) 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.getStringArray(HttpCommandProcessor.java:271) 
    [java] at com.thoughtworks.selenium.DefaultSelenium.getAllWindowTitles(DefaultSelenium.java:567) 
    [java] at com.operative.qa.automation.util.URLTestContext.seleniumStart(URLTestContext.java:232) 
    [java] at com.operative.qa.automation.util.URLTestContext.CommonLogin(URLTestContext.java:66) 
    [java] at com.operative.qa.automation.main.AutomationFileSequence.main(AutomationFileSequence.java:86) 
    [java] java.lang.NullPointerException 
    [java] at com.operative.qa.automation.util.URLTestContext.CommonLogin(URLTestContext.java:78) 
    [java] at com.operative.qa.automation.main.AutomationFileSequence.main(AutomationFileSequence.java:86) 
    [java] com.thoughtworks.selenium.SeleniumException: 
      org%2Eopenqa%2Egrid%2Ecommon%2Eexception%2EGridException%3A+Session+ 
      %5Bfc89c194951a4790bce8418dac7d5ceb%5D+not+available+%2D+%5Bext%2E+ 
      key+1a83ce8d23284bc0ae57545c85f93edf%2C+ext%2E+key+ 
      9de7dcbcdc29438db917d22773cf3598%5D 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:168) 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:104) 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:86) 
    [java] at com.thoughtworks.selenium.HttpCommandProcessor.stop(HttpCommandProcessor.java:252) 
    [java] at com.thoughtworks.selenium.DefaultSelenium.stop(DefaultSelenium.java:112) 
    [java] at com.operative.qa.automation.util.URLTestContext.stop(URLTestContext.java:268) 
    [java] at com.operative.qa.automation.main.AutomationFileSequence.main(AutomationFileSequence.java:114) 

どうすればこの問題を解決できますか?

セレンセッションを停止する方法はありますか?ときには、私は手動で実行を停止し、サーバーをシャットダウンするFirefoxブラウザを閉じる。それでも実行は継続され、すべてのテストケースを失敗としてマークします。これを取り除く方法は?

私が使用しています:グリッド2

+0

実行中にセッションを停止したいのはなぜですか?そしてあなたはスケジュールされたプロセス(Jenkins/Hudsonのような)やIDE(Eclipseなど)を使ってこれを実行しています –

+0

私たちは並行して3つのモジュールを実行しています。もし私が間違ったテナント名をチェックインしたとしたら、実行を停止して再起動する必要があります。停止するには、Eclipseログ停止を停止する(赤いボタン)を押しますが、セッションは継続します。私はブラウザを閉じて、まだセッションが続きます。その後、これらの3つのモジュールをすべて並列に起動するハブをシャットダウンしても、セッションは続行され、これらの3つのモジュールのすべてのテストケースを**失敗**とマークします。私は実行を停止することができるように、マシンの再起動は常にです。 – farheen

+0

この失敗したレポートはどこに表示されますか? testNGやjUnitのようなフレームワークを使っていますか?グリッドをシャットダウンすると、テストを実行するプロセスだけが終了します。コマンドをハブに送信するプロセスがまだあるようです。 –

答えて

0

閉会ブラウザでのSelenium RCは実行を停止しません。テストの開始に使用するプログラムやRunNotifierのpleaseStop()を使用してプログラムを停止する必要があります。

+0

私たちのsuitelauncher Javaクラスを停止しても、セッションは停止せず、コンソールだけが終了します。 RunNotifierの使い方 – farheen

+0

私はあなたがそれを開始した方法を知っておく必要があるでしょう、あなたのtestrun停止するまあ(どのプログラムでは?)とコードのビットが(有用 – ctekk

+0

プライベートの静的な無効seleniumStartだろう){ \t \t \t \t PROC =新HttpCommandProcessor( "localhostの"、4444、" * firefox "、" http://xxxxx.com:8080/xxxxe "); \t \tセレン=新しいデフォルトセレン(proc); \t \t selenium.start();\t \t – farheen

0

タスクマネージャからのjava.exeプロセスを停止します.henceセッションが終了します。

関連する問題