Merge branch 'selenium-grid-2.6'

Conflicts:
	README.md
	build.xml
	default.properties
	lib/selenium-server-standalone-2.6.0.jar
	qa-selenium5.mv.mozilla.com.project.properties
	qa-selenium6.mv.mozilla.com.project.properties
	vendor/selenium-server-standalone-2.0.0.jar
	vendor/selenium-server-standalone-2.0rc1.jar
This commit is contained in:
Dave Hunt 2011-09-16 15:15:15 +01:00
Родитель 3d6032fc55 b14a1a202f
Коммит 0e4f14a811
33 изменённых файлов: 271 добавлений и 125 удалений

Просмотреть файл

@ -17,75 +17,47 @@ Prerequisites
Configuration
-------------
Default properties are set in `project.properties`, and these can be overridden
for an individual machine by providing a `<HOSTNAME>.project.properties` file.
Any properties in this file will override the default. To find out your hostname
Default properties are set in `default.properties`, and these can be overridden
for an individual machine by providing a `<HOSTNAME>.properties` file. Any
properties in this file will override the default. To find out your hostname
run `ant debug` in the location you've checked out this project and look for
something that looks like the following line:
[echoproperties] env.HOSTNAME=LokiMac.local
In this example the hostname is `LokiMac.local` so your properties file will be
`LokiMac.local.project.properties`
`LokiMac.local.properties`
The hub configuration is stored in `hub_configuration.json`.
Properties
----------
Below are the properties that can be configured:
**grid.version**
**selenium.version**
The version number of Selenium Grid to use. This is used to locate the library,
for example a value of `1.0.8` will load the library
`lib/selenium-grid-remote-control-standalone-1.0.8.jar`
The version number of Selenium to use. This is used to locate the library,
for example a value of `2.0rc2` will load the library
`lib/selenium-server-standalone-2.0rc2.jar`
**hub.host**
The host that Selenium Grid's hub is running on. This is used for any launching
Selenium RC servers to register with the hub.
The host that the hub is running on. This is used when registering nodes with
the hub.
**hub.port**
The port that Selenium Grid's hub is running on. Also used when Selenium RC
servers are registering with the hub.
The port that the hub is running on. Also used when registering nodes with the
hub.
**rc.version**
**node.configuration**
The version of Selenium server to use. Thhis is used to locate the library, for
example a value of `2.0b3` will load the library
`vendor/selenium-grid-hub-standalone-2.0b3.jar`
**rc.host**
The host of the Selenium RC that you want to register with the Selenium Grid
hub. This is needed so that Selenium Grid can communicate back to the server.
This defaults to `localhost`, which is fine if the server is on the same machine
as the Selenium Grid hub. If these are on different machines then this property
is best set in `<HOSTNAME>.project.properties` file or on the command line. See
the section on **Launching a Selenium RC server** below for details.
**rc.port**
The port of the Selenium RC that you want to register with the Selenium Grid
hub. Along with the host, this is needed so that Selenium Grid can communicate
back to the server. This defaults to `5555`, which is fine for the first server
on a machine, but any subsequent servers need a different port to be specified
via the command line. See the section on **Launching a Selenium RC server**
below for details.
**rc.environment**
The environment to register the launching Selenium RC with in the Selenium Grid
hub. This property should not be set in `project.properties` because it will
differ for each machine, and it should also not be set in
`<HOSTNAME>.project.properties` file as you are likely to want to invoke
multiple servers on each machine with different environment names. The best way
to set this property is via the command line. See the section on **Launching a
Selenium RC server** below for details.
Configuration file for the Selenium node, including browser capabilities.
**rc.arguments**
Any additional arguments to pass to Selenium RC server when it's launched. For
Any additional arguments to pass to an RC node when it's launched. For
example, *-singleWindow* would launch the Selenium and the application under
test in the same window using frames.
@ -97,28 +69,35 @@ command line argument and a fresh profile will be generated. Note that the
Firefox profile needs to be located in `firefoxprofiles` directory, and the
value of this property is the relative path within `firefoxprofiles`.
Launching a Selenium Grid hub
-----------------------------
Launching a Selenium hub
------------------------
Run the following command from the project's location:
ant launch-hub
Launching a Selenium RC server
------------------------------
Launching a Selenium WebDriver node
-----------------------------------
Run the following command from the project's location:
ant launch-remote-control -Drc.port=<PORT> -Drc.environment=<ENVIRONMENT>
ant launch-webdriver
Where `<PORT>` is the port you want to run the Selenium RC server on, and
`<ENVIRONMENT>` is the name of the environment you want to register with
Selenium Grid's hub.
Launching a Selenium RC node
----------------------------
If you have not specified a value for `rc.host` in your
`<HOSTNAME>.project.properties` file then you can also specify this on the
command line by appending `-Drc.host=<HOST>` where `<HOST>` is the host of the
machine.
Run the following command from the project's location:
ant launch-remote-control
Specifying properties on the command line
-----------------------------------------
You can override any of the properties from `default.properties` or
`<HOSTNAME>.properties` on the command line by passing them in the format
`-D<PROPERTY>=<VALUE>`. For example, to specify a custom firefox profile for an
RC node you would use `ant launch-remote-control
-Dcustom.firefox.profile=myProfile`
License
-------

Просмотреть файл

@ -4,24 +4,13 @@
<exec executable="hostname" osfamily="unix" failifexecutionfails="false" outputproperty="env.COMPUTERNAME"/>
<property name="env.HOSTNAME" value="${env.COMPUTERNAME}"/> <!-- Windows vs. Linux -->
<property file="${basedir}/${env.HOSTNAME}.project.properties" />
<property file="${basedir}/project.properties"/>
<property file="${basedir}/${env.HOSTNAME}.properties" />
<property file="${basedir}/default.properties"/>
<path id="remote-control.classpath">
<fileset dir="${basedir}/vendor">
<include name="selenium-server-standalone-${rc.version}.jar"/>
</fileset>
<!-- Selenium Server must be first in classpath -->
<fileset dir="${basedir}/lib">
<include name="selenium-grid-remote-control-standalone-${grid.version}.jar"/>
</fileset>
<pathelement path="${java.class.path}/"/>
</path>
<path id="hub.classpath">
<path id="selenium.classpath">
<pathelement path="${basedir}/"/>
<fileset dir="${basedir}/lib">
<include name="selenium-grid-hub-standalone-${grid.version}.jar"/>
<include name="selenium-server-standalone-${selenium.version}.jar"/>
</fileset>
<pathelement path="${java.class.path}/"/>
</path>
@ -32,10 +21,33 @@
</target>
<target name="launch-hub" description="Launch Selenium Hub">
<java classname="com.thoughtworks.selenium.grid.hub.HubServer"
classpathref="hub.classpath"
<java classname="org.openqa.grid.selenium.GridLauncher"
classpathref="selenium.classpath"
fork="true"
failonerror="true" />
failonerror="true">
<arg value="-role"/>
<arg value="hub"/>
<arg value="-grid1Yml"/>
<arg value="grid_configuration.yml"/>
<arg value="-hubConfig"/>
<arg value="hub_configuration.json"/>
</java>
</target>
<target name="launch-webdriver">
<java classpathref="selenium.classpath"
classname="org.openqa.grid.selenium.GridLauncher"
fork="true"
failonerror="true">
<arg value="-role"/>
<arg value="webdriver"/>
<arg value="-hub"/>
<arg value="http://${hub.host}:${hub.port}/grid/register"/>
<arg value="-host"/>
<arg value="${node.host}"/>
<arg value="-nodeConfig"/>
<arg value="${node.configuration.file}"/>
</java>
</target>
<target name="launch-remote-control"
@ -51,47 +63,37 @@
</target>
<target name="launch-remote-control-with-custom-profile" depends="check-for-custom-profile" if="use.custom.profile">
<fail unless="rc.host" message="Property rc.host must be set in ${env.HOSTNAME}.project.properties" />
<fail unless="rc.port" message="Property rc.port must be set in ${env.HOSTNAME}.project.properties" />
<fail unless="rc.environment" message="Property rc.environment must be set on the command line. Example: -Drc.environment='Firefox Beta on Mac OS X'" />
<java classpathref="remote-control.classpath"
classname="com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControlLauncher"
<java classpathref="selenium.classpath"
classname="org.openqa.grid.selenium.GridLauncher"
fork="true"
failonerror="true">
<arg value="-port"/>
<arg value="${rc.port}"/>
<arg value="-role"/>
<arg value="rc"/>
<arg value="-hub"/>
<arg value="http://${hub.host}:${hub.port}/grid/register"/>
<arg value="-host"/>
<arg value="${rc.host}"/>
<arg value="-hubURL"/>
<arg value="http://${hub.host}:${hub.port}"/>
<arg value="-env"/>
<arg value="${rc.environment}"/>
<arg value="${node.host}"/>
<arg value="-nodeConfig"/>
<arg value="${node.configuration.file}"/>
<arg value="-firefoxProfileTemplate"/>
<arg value="${basedir}${file.separator}firefoxprofiles${file.separator}${custom.firefox.profile}"/>
<arg value="-hubPollerIntervalInSeconds"/>
<arg value="30"/>
<arg line="${rc.arguments}"/>
</java>
</target>
<target name="launch-remote-control-without-custom-profile" depends="check-for-custom-profile" unless="use.custom.profile">
<fail unless="rc.host" message="Property rc.host must be set in ${env.HOSTNAME}.project.properties" />
<fail unless="rc.port" message="Property rc.port must be set in ${env.HOSTNAME}.project.properties" />
<fail unless="rc.environment" message="Property rc.environment must be set on the command line. Example: -Drc.environment='Firefox Beta on Mac OS X'" />
<java classpathref="remote-control.classpath"
classname="com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControlLauncher"
classname="org.openqa.grid.selenium.GridLauncher"
fork="true"
failonerror="true">
<arg value="-port"/>
<arg value="${rc.port}"/>
<arg value="-role"/>
<arg value="rc"/>
<arg value="-hub"/>
<arg value="http://${hub.host}:${hub.port}/grid/register"/>
<arg value="-host"/>
<arg value="${rc.host}"/>
<arg value="-hubURL"/>
<arg value="http://${hub.host}:${hub.port}"/>
<arg value="-env"/>
<arg value="${rc.environment}"/>
<arg value="-hubPollerIntervalInSeconds"/>
<arg value="30"/>
<arg value="${node.host}"/>
<arg value="-nodeConfig"/>
<arg value="${node.configuration.file}"/>
<arg line="${rc.arguments}"/>
</java>
</target>

Просмотреть файл

@ -1,11 +1,8 @@
grid.version=1.0.8
selenium.version=2.6.0
hub.host=qa-selenium.mv.mozilla.com
hub.port=4444
rc.version=2.0.0
rc.host=localhost
rc.port=5555
rc.arguments=
node.configuration.file=rc-mac.json
custom.firefox.profile=certificateExceptions

Просмотреть файл

@ -1,5 +1,4 @@
hub:
port: 4444
environments:
- name: "Firefox 3.6 on Mac OS X"
browser: "*firefox /Applications/Firefox 3.6.app/Contents/MacOS/firefox-bin"

3
hub_configuration.json Normal file
Просмотреть файл

@ -0,0 +1,3 @@
{
"timeout": 180000
}

Просмотреть файл

@ -1,2 +0,0 @@
title Selenium RC [%1] [%2]
ant launch-remote-control -Drc.port=%1 -Drc.environment=%2

Просмотреть файл

@ -1,3 +0,0 @@
#!/bin/bash
echo -n -e "\033]0;Selenium RC [$1] [$2]\007"
ant launch-remote-control -Drc.port=$1 -Drc.environment="$2"

Просмотреть файл

@ -1,3 +0,0 @@
echo -n -e "\033]0;Selenium Grid\007"
cd ~/moz-grid-config/
ant launch-hub

Двоичные данные
lib/selenium-grid-hub-standalone-1.0.8.jar

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -1 +0,0 @@
rc.host=qa-selenium.mv.mozilla.com

Просмотреть файл

@ -0,0 +1 @@
node.host=qa-selenium.mv.mozilla.com

Просмотреть файл

@ -1 +0,0 @@
rc.host=qa-selenium2.mv.mozilla.com

Просмотреть файл

@ -0,0 +1 @@
node.host=qa-selenium2.mv.mozilla.com

Просмотреть файл

@ -1 +0,0 @@
rc.host=qa-selenium3.mv.mozilla.com

Просмотреть файл

@ -0,0 +1 @@
node.host=qa-selenium3.mv.mozilla.com

Просмотреть файл

@ -1 +0,0 @@
rc.host=qa-selenium4.mv.mozilla.com

Просмотреть файл

@ -0,0 +1 @@
node.host=qa-selenium4.mv.mozilla.com

Просмотреть файл

@ -1 +0,0 @@
rc.host=qa-selenium5.mv.mozilla.com

Просмотреть файл

@ -0,0 +1 @@
node.host=qa-selenium5.mv.mozilla.com

Просмотреть файл

@ -1 +0,0 @@
rc.host=qa-selenium6.mv.mozilla.com

Просмотреть файл

@ -0,0 +1,2 @@
node.host=qa-selenium6.mv.mozilla.com
node.configuration.file=wd-mac.json

Просмотреть файл

@ -1 +0,0 @@
rc.host=192.168.165.128

Просмотреть файл

@ -1 +0,0 @@
rc.host=10.250.3.115

2
qa2-win7.properties Normal file
Просмотреть файл

@ -0,0 +1,2 @@
node.host=10.250.3.115
node.configuration.file=rc-win7.json

Просмотреть файл

@ -1 +0,0 @@
rc.host=10.250.7.202

2
qa4-win7.properties Normal file
Просмотреть файл

@ -0,0 +1,2 @@
node.host=10.250.7.202
node.configuration.file=rc-win7.json

2
qa6-vista.properties Normal file
Просмотреть файл

@ -0,0 +1,2 @@
node.host=10.250.7.242
node.configuration.file=wd-win.json

30
rc-mac.json Normal file
Просмотреть файл

@ -0,0 +1,30 @@
{
"capabilities":
[
{
"browserName": "Firefox 3.6 on Mac OS X",
"maxInstances": 5
}, {
"browserName": "Firefox 4 on Mac OS X",
"maxInstances": 5
}, {
"browserName": "Firefox 5 on Mac OS X",
"maxInstances": 5
}, {
"browserName": "Firefox 6 on Mac OS X",
"maxInstances": 5
}, {
"browserName": "Firefox Beta on Mac OS X",
"maxInstances": 5
}, {
"browserName": "Firefox Aurora on Mac OS X",
"maxInstances": 5
}, {
"browserName": "Firefox Nightly on Mac OS X",
"maxInstances": 5
}
],
"configuration": {
"timeout": 180000
}
}

33
rc-win7.json Normal file
Просмотреть файл

@ -0,0 +1,33 @@
{
"capabilities":
[
{
"browserName": "Firefox 3.6 on Windows 7",
"maxInstances": 5
}, {
"browserName": "Firefox 4 on Windows 7",
"maxInstances": 5
}, {
"browserName": "Firefox 5 on Windows 7",
"maxInstances": 5
}, {
"browserName": "Firefox 6 on Windows 7",
"maxInstances": 5
}, {
"browserName": "Firefox Beta on Windows 7",
"maxInstances": 5
}, {
"browserName": "Firefox Aurora on Windows 7",
"maxInstances": 5
}, {
"browserName": "Firefox Nightly on Windows 7",
"maxInstances": 5
}, {
"browserName": "Internet Explorer 8 on Windows 7",
"maxInstances": 1
}
],
"configuration": {
"timeout": 180000
}
}

51
wd-mac.json Normal file
Просмотреть файл

@ -0,0 +1,51 @@
{
"capabilities":
[
{
"browserName": "firefox",
"version": "3.6",
"firefox_binary": "/Applications/Firefox 3.6.app/Contents/MacOS/firefox-bin",
"platform": "MAC",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "4",
"firefox_binary": "/Applications/Firefox 4.app/Contents/MacOS/firefox-bin",
"platform": "MAC",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "5",
"firefox_binary": "/Applications/Firefox 5.app/Contents/MacOS/firefox-bin",
"platform": "MAC",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "6",
"firefox_binary": "/Applications/Firefox 6.app/Contents/MacOS/firefox-bin",
"platform": "MAC",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "beta",
"firefox_binary": "/Applications/Firefox Beta.app/Contents/MacOS/firefox-bin",
"platform": "MAC",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "aurora",
"firefox_binary": "/Applications/Aurora.app/Contents/MacOS/firefox-bin",
"platform": "MAC",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "nightly",
"firefox_binary": "/Applications/Nightly.app/Contents/MacOS/firefox-bin",
"platform": "MAC",
"maxInstances": 5
}
],
"configuration": {
"timeout": 180000
}
}

56
wd-win.json Normal file
Просмотреть файл

@ -0,0 +1,56 @@
{
"capabilities":
[
{
"browserName": "firefox",
"version": "3.6",
"firefox_binary": "C:/Program Files/Mozilla Firefox 3.6/firefox.exe",
"platform": "WINDOWS",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "4",
"firefox_binary": "C:/Program Files/Mozilla Firefox 4/firefox.exe",
"platform": "WINDOWS",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "5",
"firefox_binary": "C:/Program Files/Mozilla Firefox 5/firefox.exe",
"platform": "WINDOWS",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "6",
"firefox_binary": "C:/Program Files/Mozilla Firefox 6/firefox.exe",
"platform": "WINDOWS",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "beta",
"firefox_binary": "C:/Program Files/Mozilla Firefox Beta/firefox.exe",
"platform": "WINDOWS",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "aurora",
"firefox_binary": "C:/Program Files/Aurora/firefox.exe",
"platform": "WINDOWS",
"maxInstances": 5
}, {
"browserName": "firefox",
"version": "nightly",
"firefox_binary": "C:/Program Files/Nightly/firefox.exe",
"platform": "WINDOWS",
"maxInstances": 5
}, {
"browserName": "internet explorer",
"version": "8",
"platform": "WINDOWS",
"maxInstances": 1
}
],
"configuration": {
"timeout": 180000
}
}