Normal Mode
Only RSpec >= 3.x, Minitest, and Cucumber are supported. Let us know if you use a different test runner.
Knapsack Pro splits your tests dynamically between parallel CI nodes.
Each Knapsack Pro Client (parallel CI node):
- Retrieves from the Knapsack Pro API a subset of tests to execute
- Runs those tests
- Repeats 1. and 2. as long as there are more tests in the API queue
- Sends the test execution times to the API for the subsequent CI runs
Knapsack Pro distributes tests so that each CI node finishes at the same time. Thanks to that, your CI build time is as fast as possible.
Knapsack Pro allows distributing the tests in a static way (KNAPSACK_PRO_SINGLE_BATCH=true) too, but it’s rarely a good solution:
- Tests themselves, especially end to end, have varying execution times
- Failing tests execute faster than green ones
- CI nodes may differ in hardware/performance
- CI nodes boot at different times
- CI nodes are more or less busy when the environment is shared/virtualized
- CI nodes may load their caches at dissimilar times
- Test execution starts at different times on different CI nodes
- Flaky tests are.. Well, flaky!
Note that Knapsack Pro returns single-file subsets when dealing with test files that haven't been recorded yet. This ensures your CI nodes complete at a similar time. However, if your test runner requires a long time to boot on each subset, it may take longer to run your tests. This applies only to the first Knapsack Pro run ever per API token.
Configuration and Troubleshooting
You can find additional configuration options and troubleshooting on the following pages: