Reputation: 3712
So running rake test (they are MiniTests) takes about 10 minutes for me (large rails project 95,000 lines of code in the /app directory). Its averaging about 25 assertions a second. The problem is there are a lot of tests.
Is there a way to run these in parallel (They are MiniTests)? I noticed only 1 core seems to be doing the work. Whats the best practice to execute these in Parallel?
mind you I am trying to best use all the resources (4-12 cores on the current machine the tests are running on). running them on separate machines isnt something i am looking at exploring currently.
so its impossible to concurrently run code on 2 cores at the same time with MRI i take it? using Jruby isnt an option currently.
Upvotes: 3
Views: 2506
Reputation: 868
I think parallel_tests can help you.
This gem will run some parallel tests, each in a separate process. In total you get ~100% loading on each your cores.
Upvotes: 1