代码之家  ›  专栏  ›  技术社区  ›  Brett Rigby

Selenium网格是否会在NAnt(而不是Ant)下运行?

  •  3
  • Brett Rigby  · 技术社区  · 17 年前

    这里是我找到的Selenium网格页面的URL,但它们指的是Ant。。。

    Get started

    Run the demo

    2 回复  |  直到 17 年前
        1
  •  2
  •   Rich Seller    17 年前

    从Selenium网格页面:

    要运行Selenium网格,您需要在系统上安装有效的Java5+JDK。

    exec task .

        2
  •  1
  •   Yauheni Sivukha    16 年前

    这很容易:

      <property name="selenium.server.file" value="${src.dir}\_tools\selenium\selenium-server.jar" />
      <property name="selenium.grid.hub.file" value="${src.dir}\_tools\selenium\selenium-grid-hub-standalone-1.0.4.jar" />
      <property name="selenium.grid.rc.file" value="${src.dir}\_tools\selenium\selenium-grid-remote-control-standalone-1.0.4.jar" />
    

     <target name="start.selenium.grid.hub">
        <exec program="java" verbose="true" failonerror="false">
          <arg value="-jar" />
          <arg value="${selenium.grid.hub.file}" />
        </exec>
      </target>
    

    启动rc:

    <target name="start.selenium.grid.rc">
        <exec program="java" verbose="true" failonerror="false">
          <arg value="-classpath" />
          <arg value="${selenium.server.file};${selenium.grid.rc.file}" />
          <arg value="com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControlLauncher" />
        </exec>
      </target>
    

    或者简单地从命令行:

    java-jar D:\work\SeleniumDesign\build\u artifacts\artifacts\continuous\source\u tools\selenium\selenium-grid-hub-standalone-1.0.4.jar

    和

    java-classpath D:\work\SeleniumDesign\build\u artifacts\artifacts\continuous\source\u tools\selenium\selenium-server.jar;D:\work\SeleniumDesign\build\u artifacts\artifacts\continuous\source\u tools\selenium\selenium-grid-remote-control-standalone-1.0.4.jar com.thoughtworks.selenium.grid.remotecontrol.selfregisteringmotecontrollerauncher

    推荐文章