$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.
Links
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 是一款shell 脚本集成开发环境,支持 bats-core 的 $BATS_TEST_RETRIES - 立即试用!