$BATS_TEST_RETRIES  –  Additional attempts to run flaky tests

$BATS_TEST_RETRIES defines the number of additional attempts to run flaky tests. The default value 0 indicates that tests are expected to pass at the first attempt.

Examples

Retry up to three times to run a flaky bats-core test
1
2
3
4
5
BATS_TEST_RETRIES=2 # additional attempts
  
@test "Flaky test" {
  return "$(( RANDOM % 2 ))"
}
BashSupport Pro ist eine Shell-Skript-IDE mit Unterstützung für $BATS_TEST_RETRIES von bats-core - probieren Sie es jetzt aus!
© 2020–2024 Joachim Ansorg
Impressum
Datenschutz
Rechtliches