I think what you mean is parallel execution (which is distributed testing)? Selenium grid will provide the architecture to run these tests in a distributed fashion (i.e. distribute the test execution across multiple nodes), but you still need to trigger these tests in parallel.
Currently your tests are triggered sequentially, so the Selenium Grid Hub utilizes the first available node it gets, which happens to be the first one each time (for obvious reasons).
To quickly visualize how selenium grid can benefit with parallel execution, open 4 command prompts/terminals and in each trigger 1 of the 4 tests. If you have only 2 nodes and each node can only run one browser, you will see
- Node A - Test 1
- Node B - Test 2
- Waiting for a free/available node {Test 3 and Test 4}
Then depending on which test (1 or 2) finishes executing first that node gets free and Test 3 will start on that node.
Of course you need to programmatically trigger these tests in parallel.
In python you could use nose
and trigger your test run like so :-
nosetests --processes=2 allmytests #Starts 2 processes