Function Name of Test

$BATS_TEST_NAME is the name of the function containing the current test case.

Examples

Print name of current test function :

1
2
3
@test "Example" {
  echo "Function name: $BATS_TEST_NAME" >&3
}
BashSupport Pro is a Bash IDE with support for $BATS_TEST_NAME – try it now!
© 2020–2022 Joachim Ansorg
Imprint
Privacy Policy
Legal