grosser / parallel_tests

Ruby: 2 CPUs = 2x Testing Speed for RSpec, Test::Unit and Cucumber
3.38k stars 495 forks source link

selenium driver + grid vs test grouping #914

Closed grosser closed 1 year ago

grosser commented 1 year ago

(copied from email) I run ruby tests with selenium webdriver and selenium grid. I have incorporated your parallel_tests gem to send -n tests to the grid in parallel.

I was wondering if there may be a way to override the idea "that EVERY group is treated as being the first parallel test (and TEST_ENV_NUMBER is blank)". I am running into the TEST_ENV_NUMBER restarting at blank(1) for each batch of tests I am sending in as a single command line call...based on more tests being passed in than the -n number I have set. (I looked at the --only-group option but that seems to be for subsequent calls.

An example is setting -n to a smaller number than tests submitted, say 2... and submitting 6 tests is when the TEST_ENV_NUMBER renumbering occurs. It runs [TEST_GROUP 1][TEST_GROUP 2] for tests 1&2, then tests 3&4 get the same [TEST_GROUP 1][TEST_GROUP 2] and 5&6 and so on.

Is there a way to have it continue numbering all the tests sent in that same request and not start over based on the batch sent? So 3&4 would get [TEST_GROUP 3][TEST_GROUP 4] and so on.

grosser commented 1 year ago

I don't see any option that would allow what you want. Can you try and find the code that does the splitting/reordering and see if it can be easily modified to optionally do what you had in mind ?

gklueh commented 1 year ago

It is just jquery so should be possible... easily idk :) Thank you!

gklueh commented 1 year ago

I actually solved this, I had a few local issues that I was able to fix and this all went away.. thank you, feel free to close.