To accomplish this you will need
1) a Red Hat or CentOS system, I'm using CentOS 5.4
2) Ant 1.7.x
3) JDK version 6

4) Selenium Grid

5) Firefox to demo an test setup

The following tutorial shows how to configure Selenium-RC on a single system

Step 1 - Install JDK 6 on the system and make sure "java" is in your path.

[root@cu003 java]# java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

Step 2 - Download and install Ant and make sure "ant" is in your path.

[root@cu003 tmp]# unzip apache-ant-1.7.1-bin.zip

[root@cu003 tmp]# mv  apache-ant-1.7.1 /usr/local

export PATH=$PATH:/usr/local/apache-ant-1.7.1/bin

[root@cu003 apache-ant-1.7.1]# ant -version
Apache Ant version 1.7.1 compiled on June 27 2008

Step 3 - Unpack Selenium and sanity check setup

[root@cu003 tmp]# unzip selenium-grid-1.0.8-bin.zip

[root@cu003 tmp]# mv selenium-grid-1.0.8 /usr/local
[root@cu003 tmp]# cd /usr/local/selenium-grid-1.0.8/

[root@cu003 selenium-grid-1.0.8]# ant sanity-check
Buildfile: build.xml

sanity-check:
[echo] Apache Ant version 1.7.1 compiled on June 27 2008
[echo] Java 1.6
[echo]
[echo] ********************************************************************
[echo] Congratulations, your setup looks good. Have fun with Selenium Grid!
[echo] ********************************************************************
[echo]
[echo] You can launch a hub by running 'ant launch-hub'
[echo] You can launch a a remote control with 'ant -Dport=4444 launch-remote-control'

BUILD SUCCESSFUL
Total time: 1 second

Step  4 - Time to test and demo!!!

Go to the selenium distribution directory and launch in a new terminal:

[root@cu003 selenium-grid-1.0.8]# ant launch-hub
Buildfile: build.xml

launch-hub:
[java] Nov 13, 2010 3:03:31 PM com.thoughtworks.selenium.grid.hub.HubRegistry gridConfiguration
[java] INFO: Loaded grid configuration:
[java] ---
[java] hub:
[java]   environments:
[java]     -
[java]       browser: "*firefox"
[java]       name: Firefox on Windows

Check out that the Hub is running by looking at its console in a browser

http://<server>:4444/console

In a new terminal on the same machine, launch:

[root@cu003 selenium-grid-1.0.8]# ant launch-remote-control
Buildfile: build.xml

launch-remote-control:
[java] Nov 13, 2010 3:08:42 PM com.thoughtworks.selenium.grid.remotecontrol.RegistrationRequest execute
[java] INFO: Registering to http://localhost:4444/registration-manager/register
[java] Nov 13, 2010 3:08:43 PM com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControl logStartingMessages

In a browser, go back to the Hub’s console at http://localhost:4444/console. Now you should have one remote control listed as available. You should see something like:

Step 5 - Execute demo tests

In a new terminal

ant run-demo-in-sequence

Four Selenium tests will then run in sequence against your remote control. Take note of how long it took to run the whole test suite – this will give you a baseline. To be honest, there is nothing really exciting about this part of the demo. You can achieve exactly the same thing with a traditional remote control. This is just to get you started, since the whole point of the Selenium grid is to run tests in parallel. That’s exactly what we are going to do next.

Watch a demo to see it in action

You are here

Installing Selenium Hub and Remote Control on Red Hat

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer

Error | E-SecureNetworks

Error

The website encountered an unexpected error. Please try again later.
slideshow 1 slideshow 2 slideshow 3

Error message

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer