grosser / parallel_tests

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

Executing a Single Group in Multiple Processes #960

Closed ViniMoraes closed 4 months ago

ViniMoraes commented 5 months ago

I have some questions and couldn’t find the answers in the wiki.

Is there a way to use the --only-group parameter with a single group and execute it in 2 processes?

I’m asking because I’m configuring SemaphoreCI, and the machines have 2 cores. Running on just 1 process feels like I’m losing performance. Is there a way to achieve this without passing 2 groups at the same time?

Another question: Is there a way to have a fallback when using the --group-by runtime flag if the runtime.log file is missing?

In a situation where this file doesn’t exist (like the first run or other cases), I don’t want this to throw an error and block the CI from running.

Thank you in advance!

grosser commented 4 months ago

you'd split your tests into 2x the runner you have and then execute --only-group 1,2 / --only-group 3,4 etc

use the default group-by then ?

                                 default - runtime when runtime log is filled otherwise filesize