I'm reading through the parallel_tests source but don't understand it yet, so I thought I would jump to the chase and ask my question here.
Does the parallel_tests gem run all of the tests in your sweet simultaneously or in sequence? (Is it possible for more than one test to be running at the same time)
When I run parallel tests it seems like it:
- finds all my tests
- divides them up into even piles (one for each processor)
- runs each pile of tests in sequence
I'm wondering this because the difference time difference between running rake parallel:test (75 minutes) and rake test (85 minutes) with four processors is slight.
The output for parallel tests makes it seem like it's running the groups of tests in sequence.
My output looks like this:
It will start by indicating it's found all my processors:
rake parallel:test[functional]
4 processes for 223 tests, ~ 55 tests per process
Then it seems to run each subset of tests in sequence:
......
841 tests, 3605 assertions, 0 failures, 3 errors, 0 skips
Test run options: --seed 15002
oaded suite -e
...............
Finished in 1928.494289 seconds.
542 tests, 2296 assertions, 0 failures, 0 errors, 0 skips
Test run options: --seed 30455
oaded suite -e
....
etc...
So, is this a trick of my output, or is it really running each set of tests one after another. I was thinking I would get better a time improvement, plus this has big implications for other stuff I need to parallelize to make my tests run.