What is optimal order of test commands?
Tip 1:
I recommend to run first the test commands in the regular mode and later the commands in the queue mode.
- Step 1.
bundle exec rake knapsack_pro:cucumber
(regular mode) - Step 2.
bundle exec rake knapsack_pro:queue:rspec
(queue mode)
Thanks to that when for some reason the tests executed for cucumber in regular mode will not be well balanced across CI nodes (for instance when one of CI node has bad performance) then the rspec tests executed later in the queue mode will autobalance your build.
Tip 2:
When you have short test suite, for instance in javascript then you could distribute tests this way:
CI 0
- Step 1:
npm test
- Step 2:
bundle exec rake knapsack_pro:queue:rspec
- Step 1:
CI 1
- Step 1:
bundle exec rake knapsack_pro:queue:rspec
- Step 1:
You will run your javascript tests on single CI node and the knapsack_pro
will auto-balance CI build with Queue Mode. Thanks to that CI build time execution will be flat and optimal (as fast as possible).