Java:Selenium Grid: How to Run specific tests on particular node

1.2k views Asked by At

I am new to selenium. I wrote 4 tests, now i want to run 2 tests on one node and two to other, how to do that. both the node have same configurations i mean same browser same platform and same versions i am using selenium-server-standalone-2.44.0.jar to create hub and node.

1

There are 1 answers

1
tim-slifer On BEST ANSWER

Grid generally manages distribution of test case execution on it's own. If both nodes are of the same configuration, Grid will send a test to each node, then as these first tests complete, another test will be sent, repeated until the suite is complete. Depending on the length of your tests, this could in fact result in two tests on each node being executed. If tests vary in length, you could possibly end up with a 3/1 scenario. Even if that's the case though, it wouldn't create any technical difference so long as the nodes are the same (as you stated, they are).

Unless you have a specific purpose in mind for why which tests get executed on which node, Grid pretty much handles all the work of dividing the work among the resources it has at its disposal.

I know this info is somewhat generic, but if you have a specific requirement, please update your question and we'll all be able to help you better.