Grid allows you to :
- Scale by distributing tests on several machines (parallel execution)
- Manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers / OS.
- Minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage virtual infrastructure for instance.
Setup:
- Download the latest selenium-server-standalone-*.jar from http://code.google.com/p/selenium/downloads/list.
- Start the Hub - open CMD and run:
- java -jar selenium-server-standalone-*.jar -role hub
- Start the nodes - open CMD and run:
- java -jar selenium-server-standalone-*.jar -role node -hub http://localhost:4444/grid/register
cd c:\selenium-server (location of your server)
java -jar selenium-server-standalone-*.jar -role hub
Using Grid2 in tests:
DesiredCapabilities capability = new DesiredCapabilities();
capability.setBrowserName("firefox");
driver = new RemoteWebDriver(
new URL("http://<IP of your remote machine>:4444/wd/hub"),
capability);
More info: http://code.google.com/p/selenium/wiki/Grid2
No comments:
Post a Comment