Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium Grid + Maven 2

Is there a good tutorial or does anyone have experience with setting this up ? I have a Testsuite.html which launches my tests in one browser atm. This is done in the integration-test lifecycle by the maven selenium plugin. I want to run my tests on multiple browsers. I couldn't find any documentation about selenium grid + maven. I hope somebody can help me.

Thanks in advance, kukudas

like image 609
kukudas Avatar asked Feb 05 '09 09:02

kukudas


People also ask

When should I use Selenium grid?

You should use Selenium Grid when you want to do either one or both of following: Run your tests against different browsers, operating systems, and machines all at the same time. This will ensure that the application you are Testing is fully compatible with a wide range of browser-O.S combinations.

Can Selenium grid have multiple hubs?

Each Selenium Grid consists of exactly one hub.

What is the purpose of Selenium grid?

Selenium Grid allows the execution of WebDriver scripts on remote machines by routing commands sent by the client to remote browser instances. Grid aims to: Provide an easy way to run tests in parallel on multiple machines. Allow testing on different browser versions.


1 Answers

Selenium Grid and maven are really not much different than Selenium and maven.

Grid is basically a drop-in replacement for selenium-rc. In our current setup we let the automated build system use Grid. It does this by simply changing the selenium-rc url (which is normally localhost:4444) to the grid's url.

Additionally we specify the browser string (*firefox, *iexplore, *opera or whatever) as a system property on the mvn command line, which we pick up when we initialize the selenium client libraries in our code.

So the way we've done it we basically set up 4 different build projects with different browser strings.

like image 182
krosenvold Avatar answered Oct 06 '22 01:10

krosenvold