2011-06-20 1 views
0

私はcodehausからMaven-Seleniumプラグインによってseleneseコマンドによって使用されるセレンサーバーを設定しようとしています。私はプラグイン内で複数の実行を作成しようとしました事前統合テストフェーズでは、これは動作しませんでした。セレン・サーバーは無限ループに入り、ポートで待機していました。Maven-Seleniumプラグインのseleneseコマンドを使用してSelenium Serverを設定するにはどうすればよいですか?

seleneseコマンドがプラグインで使用するselenium-serverを上書き/設定する方法があるかどうかを知りたいと思います。私にお知らせください。

下記のPOMスニペットをご覧ください。

.... 
<properties> 
    <selenium.version>2.0b3</selenium.version> 
</properties> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>selenium-maven-plugin</artifactId> 
      <version>1.1</version> 
      <dependencies> 
       <dependency> 
        <groupId>org.seleniumhq.selenium</groupId> 
        <artifactId>selenium</artifactId> 
        <version>${selenium.version}</version> 
        <type>pom</type> 
        <exclusions> 
         <!-- prevent ant:ant versus org.apache.ant:ant collision --> 
         <exclusion> 
          <groupId>ant</groupId> 
          <artifactId>ant</artifactId> 
         </exclusion> 
        </exclusions> 
       </dependency> 
      </dependencies> 
      <executions> 
       <execution> 
        <id>Run-Script</id> 
        <phase>integration-test</phase> 
        <goals> 
         <goal>selenese</goal> 
        </goals> 
        <configuration> 
         <browser>*firefox</browser> 
         <suite>src/test/selenium/html/TestSuite.html</suite> 
         <startURL>http://localhost:4444/</startURL> 
         <results>${project.build.directory}/results/${browser.type}-${test.type}-results.html</results> 
         <port>4444</port> 
         <timeoutInSeconds>${selenium.server.timeout.seconds}</timeoutInSeconds> 
         <multiWindow>${multiple.windows}</multiWindow> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 
</build> 
.... 

おかげで、

フアン

答えて

0

テスト対象のアプリケーションのURLにstartURLを設定する代わりに、セレンのrcサーバのURLを指してみてください。たとえば、あなたのセレンのテストケースは、Googleでリンクをクリックした場合、http://www.google.com

にstartURLを設定ここで働いている私のポンポンからの抜粋です**

<plugin> 
<groupId>org.codehaus.mojo</groupId> 
<artifactId>selenium-maven-plugin</artifactId> 
     <configuration> 
     <browser>*firefox</browser> 
     <startURL>http://my-site.com</startURL> 
     <suite>test-suite</suite> 
     <!-- <logOutput>true</logOutput> --> 
     <!-- <timeoutInSeconds>30</timeoutInSeconds> --> 
     </configuration> 
<executions> 
    <execution> 
    <id>test</id> 
     <phase>test</phase> 
     <goals> 
     <goal>selenese</goal> 
     </goals> 
    </execution> 
</executions> 
    </plugin> 

**これは、Mac OS上の点を除いて素晴らしい作品、ファイアフォックスは開いたままになり、閉じることはありませんか?しかし、それが助けてくれることを望む。

関連する問題