KJW
KJW

Reputation: 15251

selenium grid 2 ready, how do I send a "test" job to the remote server?

On my linux box somewhere in the United States, it's running Selenium Grid 2.

Currently 3 people will be regularly running parallel tests, but there's potential for more people to join and running more parallel tests....

now they are in other parts of the world, they need to submit an xml file which contains the test data, and the server needs to parse this and figure out the rules.

How can the client invoke a test to run on the remote server? via HTTP POSTing the xml file to the url in which the grid is running on?

Is it cheaper to just rent out a fast linux server and then buy more as number of parallel tests increase?

Or should I right off the bat, hook it up to Amazon ec2? If there are parallel tests on an ajax heavy web applications running 24/7, would it be cheaper to go with the single dedicated box or amazon? google app engine (no plugins for grid?)?

Upvotes: 0

Views: 1716

Answers (1)

A.J
A.J

Reputation: 4949

I am not sure I understood the xml submitting part in your question. However, I can tell you an example which will help to you understand how to submit the tests to grid.

Three people, PersonA, PersonB and PersonC are creating selenium tests in their local machine. They currently run the test using an ANT build (or something similar) against the selenium server jar which is in their local machine. In their code they would be having a line of code which tells which selenium instance should be used to run this test. This will be mostly like

new DefaultSelenium("localhost",port,browsername,URL)

Now these people want to move to selenium grid (1 or 2). Here is what they will have to do to use the grid

All they have to do is change the command

new DefaultSelenium("localhost",port,browsername,URL)

to

new DefaultSelenium("hubIPAddress",portInWhichHubWasStarted,browsername,URL)

Note:- browserName - Make sure there is a remote node registered in Hub for the same browserName.

Now all the commands will be sent to Selenium Hub and Hub would execute the commands using the remote nodes.

Hope this helps. Please post if you have any questions.

Upvotes: 1

Related Questions