github bats-core/bats-core v1.8.0

latest releases: v1.11.0, v1.11.0-RC2, v1.11.0-RC1...
19 months ago

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
    avoiding bash: bats: No such file or directory on docker<20.10 (or
    runc<v1.0.0-rc93) (#622)
  • BATS_TEST_TIMEOUT variable to force a timeout on test (including setup()) (#491)
  • also print (nonempty) $stderr (from run --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 of setup_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 as run =<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
  • double slashes in paths derived from TMPDIR on MacOS (#607)
  • fix load in teardown marking failed tests as not run (#612)
  • fix unset variable errors (with set -u) and add regression test (#621)
  • teardown_file errors don't swallow setup_file errors anymore, the behavior
    is more like teardown's now (only return/last command can trigger teardown
    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 for BATS_LIB_PATH (#628)
  • fix unset variable in bats-formatter-junit when setup_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 on setup_suite failures (#643)
  • fix load not being available in setup_suite (#644)
  • fix RPM spec, add regression test (#648)
  • fix handling of IFS by run (#650)
  • only print setup_suite's stderr on errors (#649)

Documentation

  • fix typos, spelling and links (#596, #604, #619, #627)
  • fix redirection order of an example in the tutorial (#617)

Don't miss a new bats-core release

NewReleases is sending notifications on new releases.