Bats 1.8.0
Released: 2022-09-15
Added:
- using external formatters via
--formatter <absolute path>
(also works for
--report-formatter
) (#602) - running only tests that failed in the last run via
--filter-status failed
(#483) - variable
BATS_TEST_RETRIES
that specifies how often a test should be
reattempted before it is considered failed (#618) - Docker tags
latest-no-faccessat2
and<bats-version\>-no-faccessat2
for
avoidingbash: bats: No such file or directory
ondocker<20.10
(or
runc<v1.0.0-rc93
) (#622) BATS_TEST_TIMEOUT
variable to force a timeout on test (includingsetup()
) (#491)- also print (nonempty)
$stderr
(fromrun --separate-stderr
) with
--print-output-on-failure
(#631) # bats test_tags=<tag list>
/# bats file_tags=<tag list>
and
--filter-tags <tag list>
for tagging tests for execution filters (#642)- warning BW03: inform about
setup_suite
in wrong file (.bats
instead ofsetup_suite.bash
) (#652)
Documentation
- update gotcha about negated statements: Recommend using
run !
on Bats
versions >=1.5.0 (#593) - add documentation for
bats_require_minimum_version
(#595) - improve documentation about
setup_suite
(#652)
Fixed:
- added missing shebang (#597)
- remaining instances of
run -<N>
being incorrectly documented asrun =<N>
(#599) - allow
--gather-test-outputs-in <directory>
to work with existing, empty
directories (#603)- also add
--clean-and-gather-test-outputs-in <directory>
for improved UX
- also add
- double slashes in paths derived from TMPDIR on MacOS (#607)
- fix
load
inteardown
marking failed tests as not run (#612) - fix unset variable errors (with set -u) and add regression test (#621)
teardown_file
errors don't swallowsetup_file
errors anymore, the behavior
is more liketeardown
's now (onlyreturn
/last command can triggerteardown
errors) (#623)- upgraded from deprecated CI envs for MacOS (10 -> 11,12) and Ubuntu
(18.04 -> 22.04) (#630) - add
/usr/lib/bats
as default value forBATS_LIB_PATH
(#628) - fix unset variable in
bats-formatter-junit
whensetup_file
fails (#632) - unify error behavior of
teardown
/teardown_file
/teardown_suite
functions:
only fail via return code, not via ERREXIT (#633) - fix unbound variable errors with
set -u
onsetup_suite
failures (#643) - fix
load
not being available insetup_suite
(#644) - fix RPM spec, add regression test (#648)
- fix handling of
IFS
byrun
(#650) - only print
setup_suite
's stderr on errors (#649)