Monday, January 21, 2008

Running Selenium Grid on Amazon EC2

This article describes a process of setting up and running Selenium Grid web testing tool in distributed fashion.

You should have an Amazon Elastic Compute Cloud account
It is implied, that you have basic Unix/Linux administration skills and some experience with Amazon EC2 tools
Some knowledge of Selenium testing ( read more at )

How to start rolling:
1. Run instance of AMI ami-fd37d294 and get Public DNS of the instance.

2. Login into ssh terminal, using Public DNS.

3. Run following commands:

#cd /usr/share/selenium-grid-0.9.3
#ant sanity-check

Instances of this AMI can be run as "hub" or "remote control" depending on your layout. If this is going to be a remote control:

#ant -Dport= -Dhost= -DhubURL= launch-remote-control
ant -Dport=5555 -Dhost=testhost -DhubURL=http://your-hub-url:4444 -Denvironment="Firefox on Linux" launch-remote-control

Future work:
- pass parameters before launch, so it runs in hub or rm mode, all neat and automated
- add Firefox on Windows and Safari on OS X profiles


Anonymous said...

Hi Khaz,

Thanks for your article. Could you give some example situations where you would need to use Selenium Grid?


Unknown said...

Hello Mike,
here is what in my opinion describes it pretty well:

"Selenium Grid is an open-source tool that dramatically speeds up web testing by leveraging your existing computing infrastructure.

It allows you to run multiple tests in parallel and on multiple machines, cutting down the time required for running web acceptance tests."

Anonymous said...

Hello Khaz,

what Amazon Instance environment are you using?? I am using Windows Server 2008 and launching a remote control node on the machine. However, selenium only opened the Firefox browser but hang in there with blank page. Do you have idea about this?

I am running the example provided by Selenium Grid.

Thanks a lot, all the best

Unknown said...

Hello mhuang,
This article is almost 3 years old, so a lot has been changed since then. I didn't attend this topic/Selenium since 2008 and unfortunately can't be much of a help to you.

Cloud Computing Google Group