Release 0.41.0
New features
Control which tests run, and in what order
Three flags give you finer control over a run, and each one composes with --parallel:
--retry <n>(orBASHUNIT_RETRY) re-runs a failed test up tonextra times and reports it as passed if any attempt passes. It fails only after every attempt fails, and a test that recovers on retry is annotated so the flakiness stays visible instead of being hidden. Works with--stop-on-failuretoo (#737).--random-ordershuffles the order of test files and of the tests within each file to surface hidden inter-test coupling. Pair it with--seed <n>(orBASHUNIT_SEED) to replay a specific shuffle; when you omit the seed, bashunit generates one and prints it in the run header (#738).--shard <index>/<total>runs a deterministic, non-overlapping subset of the test files, so you can split one suite across several parallel CI runners (#739).
bash
bashunit --retry 2 tests/
bashunit --random-order --seed 12345 tests/
bashunit --shard 1/4 tests/ # runner 1 of 4File-based JSON and TAP reports
Alongside the streaming --output tap, you can now write reports to a file:
--report-json <file>writes results as JSON — summary counts plus per-test records — with nojqdependency (#741).--report-tap <file>writes a TAP v13 report to a file, complementing the existing streaming output (#740).
bash
bashunit --report-json report.json --report-tap report.tap tests/Three new assertions
assert_file_permissions <mode> <file>— asserts a file's octal permission mode, portable across GNU and BSDstat(#742).assert_array_length <n> <array>— asserts an array has exactlynelements (#743).assert_within_delta <expected> <actual> <delta>— asserts a number is within a tolerance, floats included (#744).
Bug fixes
- The
watchsubcommand crashed withbashunit::watch::run: command not foundin the released binary becausesrc/watch.shwas missing from the build. It is now bundled (#735).
Changes
- Faster test execution: subprocess forks were removed from the hot paths, with no change in behaviour.
See the full changelog for 0.41.0 on GitHub.