From 5b425e8b0cbe11a3274b8650b6ac1520e4ed3672 Mon Sep 17 00:00:00 2001 From: Fazle Arefin Date: Sun, 25 Feb 2024 02:33:51 +1100 Subject: [PATCH] bats: add page (#12326) * bats: add page --------- Co-authored-by: K.B.Dharun Krishna Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> Co-authored-by: Seth Falco Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --- pages/common/bats.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/common/bats.md diff --git a/pages/common/bats.md b/pages/common/bats.md new file mode 100644 index 000000000..3ae6262b5 --- /dev/null +++ b/pages/common/bats.md @@ -0,0 +1,20 @@ +# bats + +> Bash Automated Testing System: a TAP () compliant testing framework for Bash. +> More information: . + +- Run a BATS test script and output results in the TAP (Test Anything Protocol) format: + +`bats --tap {{path/to/test.bats}}` + +- Count test cases of a test script without running any tests: + +`bats --count {{path/to/test.bats}}` + +- Run BATS test cases contained in a directory and its subdirectories (files with a `.bats` extension): + +`bats --recursive {{path/to/directory}}` + +- Output results in a specific format: + +`bats --formatter {{pretty|tap|junit}} {{path/to/test.bats}}`