03 / Tests
Know which tests are flaky, slow, or worth splitting
Every job and run can report its JUnit results. BareCI keeps each test's file, name, duration and outcome, flags tests that both passed and failed on the same commit, ranks the slowest, and balances shards by how long each file really takes.
bareci report test-results/junit.xml
bareci shard --total 4 --index 1 tests/**/*.test.ts How it works
Flaky, by evidence
A test is flaky when it failed and passed on the same commit, or passed on retry. Agents and the Gate see the count and the last failure message.
Shards by duration
bareci shard assigns files longest-first onto the least-loaded shard, using recorded durations. Files with no history count as the median.
Feeds the Gate
A failed check whose failing tests are all known to be flaky is re-run before it counts, and new flaky tests in a pull request are named in the Gate's verdict.
At a glance
| History kept | 30 days |
|---|---|
| Input | JUnit XML from any job or run |
Questions
Which test frameworks work?
Any framework that writes JUnit XML. Flows also write JUnit, so end-to-end results sit beside unit tests.