← CI Test Shard Balancer

This tool vs. Knapsack Pro

Different jobs. Knapsack Pro is a paid service that keeps splitting your tests for you on every run. This is a free calculator that gives you one balanced split, today, from timing reports you already have.

What each one is for

Knapsack Pro is a commercial service for splitting a test suite across parallel CI nodes. Its public documentation describes recording timing data from your CI runs and a dynamic “queue mode” that gives tests to nodes as they become free, with libraries for several test frameworks. It is a subscription product; see its own pricing page for current plans.

This tool reads JUnit XML you already have (pytest, Jest, Go, Maven/Gradle, RSpec), computes a fixed split into N shards, and prints the files for each shard, a GitHub Actions matrix, and a sweep of shard counts priced against your setup time. It keeps no history, has no account, and sends nothing anywhere.

QuestionThis toolKnapsack Pro
CostFree, MIT licencePaid subscription; check its pricing page
Account or signupNoneRequired, with an API token in your CI
Where your test names and timings goNowhere; processed in your browser or on your machineSent to its service so it can record timings (per its documentation)
Split adapts during a runNo. A fixed split; recompute it when timings changeYes, in queue mode, tests are handed out as nodes free up
Timing historyNone. You supply a recent JUnit reportRecorded automatically from your runs
Absorbs a slow node or a one-off slow testNoLargely yes, because work is assigned late
How many shards are worth paying forYes: a sweep priced with your setup seconds and an optional wall-clock targetNot its stated focus
Flags a test longer than an even shardYesCheck its documentation
CI gate when a split has driftedYes: --max-imbalance-pct exits 1Not applicable; it re-splits on its own
FrameworksAnything that writes JUnit XML; shard commands for pytest, Jest, Go, Maven/Gradle, RSpecIts own integrations for specific frameworks; check its documentation

Use this tool when you want a good split now without an account, your timings are stable enough that a split holds for a few weeks, you cannot send test data to a third party, or you first want to know whether more shards would even help. Use Knapsack Pro when run-to-run variation is large, you do not want to maintain a split, or you want splitting that adapts during a run. Plenty of teams could start with the free calculation and move to a service if variation proves to be the problem.

Statements about Knapsack Pro summarise its public documentation as best understood when this page was written and may be out of date. Check its documentation for the current feature set and pricing.

Common questions

Is CI Test Shard Balancer a replacement for Knapsack Pro?

For one narrow job, yes: if you can live with a fixed split that you recompute from fresh JUnit XML every few weeks, this tool gives you balanced file lists and a GitHub Actions matrix for free, with no account. It is not a replacement if you want splitting that adapts on every run.

Where does Knapsack Pro do better?

Knapsack Pro describes a dynamic queue mode in which tests are handed to CI nodes as they become free, so a slow node or an unexpected slow test is absorbed during that very run, and it records timing data from your runs automatically. A fixed split computed beforehand cannot react to variation inside a run, and this tool keeps no history. If run-to-run variation is large, or you do not want to maintain a split, the paid service is the better fit.

Why would I use the free tool instead?

When you want a split now, from reports you already have, without signing up or sending test names and timings to a third party; when your timings are stable enough that a fixed split holds; or when you want a CI gate that tells you the current split has drifted. It also answers how many shards are worth paying for, given your setup time.

Is this page affiliated with Knapsack Pro?

No. This site is not affiliated with, endorsed by, or sponsored by Knapsack Pro. Knapsack Pro is named here only to describe what this tool is and is not, based on Knapsack Pro's own public documentation.

Open the CI Test Shard Balancer with your own report, or read how to split tests across CI shards first.