1

We understand that, Consider: Single hub with Node (5 Sessions). When we run tests suite(with 25 tests) then those tests will run in parallel 5 at a time. when nodes get free next test will be picked up.

But how this works:

Consider: Single hub with Node (5 Sessions).

When we run multiple test suites targeted to same HUG. (4 test suites each having 25 tests in it). if I run First Test suite targeted to that HUG, there will be 5 sessions will run in parallel. when this is in progress, if we start another set of test suite targeted to same HUB, will test cases in Second Suite need to wait until first suite complete? what will happen when all 4 suites started one after another?

1 Answers1

2

The test will request a browser from the hub. It is important to understand this difference with target. So the test requests a browser from the hub, the hub will check with it's registered nodes who has an available browser slot, and if a slot is available, will give this slot to your test. The hub however has nothing to do with your test suite at all, it just gets a request, and acts on it. So when you have multiple test suites requesting browsers, then the hub will allocate browsers in order of request, no matter who makes the request. As soon as your test closes the browser, the next test in the list of requests with the hub and not next in list of tests in testsuite will get the browser, and can then continue on with the test.

So, when all four suites start at the same time, the same thing happens as when one testsuite starts. Once all nodes are full, every test that is not running, including in other testsuites, will have to wait for their turn, but will not have to wait until one testsuite is completely done with their tests, as the other testsuites will have a pending request with the hub.

Mobrockers
  • 2,128
  • 1
  • 16
  • 28
  • As you are mentioned everything happens based on requests, here first suite have 25 requests (tests) for the slot, they are in the queue. when next set of test request comes will these have to wait until first 25 tests request to complete or request can be processed randomly? – Puneet Pattar Jun 22 '16 at 09:37
  • Does your testsuite start all 25 tests in parallel? If yes, then yes, your second testsuite has to wait until at least 22 tests have completed. But why start 25 tests in parallel when you have only 5 slots? If you limit your parallel tests to 5 threads, then your second testsuite can start queueing its tests and will have to wait at max 5 tests before it can start it's first own test. – Mobrockers Jun 22 '16 at 09:56
  • Yes, as there is 5 instances then 5 tests will run in parallel. In this Case rest 20 tests will be in pool waiting for free slot. when 2 test suites is executed, then there will be 45 tests will be in Pool. What I understand by your comment is, from 45 test pool any test can start when there is a free slot. right? – Puneet Pattar Jun 22 '16 at 10:14
  • If your test is not started, it will not be requesting a browser, so no, that is not correct. – Mobrockers Jun 22 '16 at 10:25
  • @Mobrockers, I understand that the tests can wait for the browsers, so newsessiontimeout is the waiting time of each tests in the node?Or will the tests wait as per any other configurations? – Vignesh Paramasivam Jul 15 '16 at 11:06
  • @VigneshParamasivam I believe the timeout you're referring to is for a node that has not received any commands for some time, – Mobrockers Jul 15 '16 at 13:58