You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<test> is the path to a Bats test file, or the path to a directory
199
-
containing Bats test files (ending with ".bats").
200
-
201
-
-c, --count Count the number of test cases without running any tests
202
-
-f, --filter Filter test cases by names matching the regular expression
203
-
-h, --help Display this help message
204
-
-j, --jobs Number of parallel jobs to run (requires GNU parallel)
205
-
-p, --pretty Show results in pretty format (default for terminals)
206
-
-r, --recursive Include tests in subdirectories
207
-
-t, --tap Show results in TAP format
208
-
-v, --version Display the version number
198
+
<tests> is the path to a Bats test file, or the path to a directory
199
+
containing Bats test files (ending with ".bats")
200
+
201
+
-c, --count Count test cases without running any tests
202
+
-f, --filter <regex> Only run tests that match the regular expression
203
+
-F, --formatter <type> Switch between formatters: pretty (default),
204
+
tap (default w/o term), junit
205
+
-h, --help Display this help message
206
+
-j, --jobs <jobs> Number of parallel jobs (requires GNU parallel)
207
+
--parallel-preserve-environment
208
+
Preserve the current environment for "--jobs"
209
+
(run `parallel --record-env` before)
210
+
--no-tempdir-cleanup Preserve test output temporary directory
211
+
-o, --output <dir> Directory to write report files
212
+
-p, --pretty Shorthand for "--formatter pretty"
213
+
-r, --recursive Include tests in subdirectories
214
+
-t, --tap Shorthand for "--formatter tap"
215
+
-T, --timing Add timing information to tests
216
+
-v, --version Display the version number
209
217
210
218
For more information, see https://github.com/bats-core/bats-core
211
219
```
212
-
> **Mac OSX/Darwin Warning:** If you're executing bats directly (`bin/bats`) you need to `brew install coreutils` to obtain `greadlink`. Darwin's readlink does not include the -f option. This may be fixed [by this PR](https://github.com/bats-core/bats-core/pull/217), which needs reviewers.
213
220
214
221
To run your tests, invoke the `bats` interpreter with one or more paths to test
215
222
files ending with the `.bats` extension, or paths to directories containing test
@@ -233,10 +240,26 @@ If Bats is not connected to a terminal—in other words, if you run it from a
233
240
continuous integration system, or redirect its output to a file—the results are
234
241
displayed in human-readable, machine-parsable [TAP format][TAP].
235
242
236
-
You can force TAP output from a terminal by invoking Bats with the `--tap`
243
+
You can force TAP output from a terminal by invoking Bats with the `--formatter tap`
237
244
option.
238
245
239
-
$ bats --tap addition.bats
246
+
$ bats --formatter tap addition.bats
247
+
1..2
248
+
ok 1 addition using bc
249
+
ok 2 addition using dc
250
+
251
+
By combining `-T` and `--formatter junit`, it is possible
252
+
to output junit-compatible report files.
253
+
254
+
$ bats --formatter junit -T addition.bats
255
+
1..2
256
+
ok 1 addition using bc
257
+
ok 2 addition using dc
258
+
259
+
Test reports will be output in the executing directory, but may be placed elsewhere
0 commit comments