I have 4 tests in one ruby script, which I run using command
ruby test.rb
the out put looks like
Loaded suite test
Started
....
Finished in 50.326546 seconds.
4 tests, 5 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
What I want to achieve is, run all the 4 tests in parallel instead of it being sequential. Something like 4 threads each running one test, effectively reducing the execution time to the slowest of the 4 tests +little time of the parallel execution.
I came across this, but this seems to run multiple ruby test FILES in parallel - say if i had test1.rb, test2.rb test3.rb, then all the three files would run in parallel.
Any help will be appreciated.
I tried a combination of
TestSuite
andThread
:It looks good, but I made no benchmark tests.
The output (see below) is a bit chaotic, each thread is posting his messages into the message of other threads, but it seem to work correct. So maybe you must catch the output of each thread to get better test logs.
It's supposedly possible to run tests in parallel in Ruby 1.9.3, but I haven't got that to work yet.