1App::Yath::Command::tesUts(e3r)Contributed Perl DocumentAaptpi:o:nYath::Command::test(3)
2
3
4

NAME

6       App::Yath::Command::test - Command to run tests
7

DESCRIPTION

SYNOPSIS

COMMAND LINE USAGE

11           $ yath test [options] [--] [test files/dirs] [::] [arguments to test scripts]
12
13   Help
14       --show-opts
15           Exit after showing what yath thinks your options mean
16
17       -h
18       --help
19           Exit after showing this help message
20
21       -V
22       --version
23           Show version information
24
25   Harness Options
26       --id ID
27       --run_id ID
28           Set a specific run-id
29
30           (Default: a UUID)
31
32       --no-long
33           Do not run tests with the HARNESS-DURATION-LONG header
34
35       --only-long
36           only run tests with the HARNESS-DURATION-LONG header
37
38       --shm
39       --no-shm
40           Use shm for tempdir if possible (Default: off)
41
42           Do not use shm.
43
44       -C
45       --clear
46           Clear the work directory if it is not already empty
47
48       -D
49       --dummy
50           Dummy run, do not actually execute tests
51
52       -d path
53       --dir path
54       --workdir path
55           Set the work directory
56
57           (Default: new temp directory)
58
59       -f name:details
60       --field 'JSON_STRING'
61           Add custom harness_run_fields
62
63       -j #
64       --jobs #
65       --job-count #
66           Set the number of concurrent jobs to run
67
68           (Default: 1)
69
70       -m Module
71       --load Module
72       --load-module Mod
73           Load a module in each test (after fork)
74
75           this option may be given multiple times
76
77       -M Module
78       --loadim Module
79       --load-import Mod
80           Load and import module in each test (after fork)
81
82           this option may be given multiple times
83
84       -P Module
85       --preload Module
86           Preload a module before running tests
87
88           this option may be given multiple times
89
90       -t path/
91       --tmpdir path/
92           Use a specific temp directory
93
94           (Default: use system temp dir)
95
96       -X foo
97       --exclude-pattern bar
98           Exclude files that match
99
100           May be specified multiple times
101
102           matched using `m/$PATTERN/`
103
104       -x t/bad.t
105       --exclude-file t/bad.t
106           Exclude a file from testing
107
108           May be specified multiple times
109
110       --durations path
111       --durations url
112           Point at a json file or url which has a hash of relative test
113           filenames as keys, and 'SHORT', 'MEDIUM', or 'LONG' as values. This
114           will override durations listed in the file headers. An exception
115           will be thrown if the durations file or url does not work.
116
117       --et SECONDS
118       --event_timeout #
119           Kill test if no events received in timeout period
120
121           (Default: 60 seconds)
122
123           This is used to prevent the harness for waiting forever for a hung
124           test. Add the "# HARNESS-NO-TIMEOUT" comment to the top of a test
125           file to disable timeouts on a per-test basis.
126
127       --maybe-durations path
128       --maybe-durations url
129           Same as 'durations' except not fatal if not found. If this and
130           'durations' are both specified then 'durations' is used as a
131           fallback when this fails. You may specify this option multiple
132           times and the first one that works will be used
133
134       --no-preload
135           cancel any preloads listed until now
136
137           This can be used to negate preloads specified in .yath.rc or
138           similar
139
140       --pet SECONDS
141       --post-exit-timeout #
142           Stop waiting post-exit after the timeout period
143
144           (Default: 15 seconds)
145
146           Some tests fork and allow the parent to exit before writing all
147           their output. If Test2::Harness detects an incomplete plan after
148           the test exists it will monitor for more events until the timeout
149           period. Add the "# HARNESS-NO-TIMEOUT" comment to the top of a test
150           file to disable timeouts on a per-test basis.
151
152   Job Options
153       --blib
154       --no-blib
155           (Default: on) Include 'blib/lib' and 'blib/arch'
156
157           Do not include 'blib/lib' and 'blib/arch'
158
159       --input-file file
160           Use the specified file as standard input to ALL tests
161
162       --lib
163       --no-lib
164           (Default: on) Include 'lib' in your module path
165
166           Do not include 'lib'
167
168       --no-mem-usage
169           Disable Test2::Plugin::MemUsage (Loaded by default)
170
171       --no-uuids
172           Disable Test2::Plugin::UUID (Loaded by default)
173
174       --retry-job-count=1
175           When re-running failed tests, use a different number of parallel
176           jobs. You might do this if your tests are not reliably parallel
177           safe
178
179       --retry=1
180           Run any jobs that failed a second time. NOTE: --retry=1 means
181           failing tests will be attempted twice!
182
183       --slack "#CHANNEL"
184       --slack "@USER"
185           Send results to a slack channel
186
187           Send results to a slack user
188
189       --slack-fail "#CHANNEL"
190       --slack-fail "@USER"
191           Send failing results to a slack channel
192
193           Send failing results to a slack user
194
195       --tlib
196           (Default: off) Include 't/lib' in your module path
197
198       -E VAR=value
199       --env-var VAR=val
200           Set an environment variable for each test
201
202           (but not the harness)
203
204       -i "string"
205           This input string will be used as standard input for ALL tests
206
207           See also --input-file
208
209       -I path/lib
210       --include lib/
211           Add a directory to your include paths
212
213           This can be used multiple times
214
215       --cover
216           use Devel::Cover to calculate test coverage
217
218           This is essentially the same as combining: '--no-fork', and
219           '-MDevel::Cover=-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl'
220           Devel::Cover and preload/fork do not work well together.
221
222       --default-at-search xt
223           Specify the default file/dir search when 'AUTHOR_TESTING' is set.
224           Defaults to './xt'. The default AT search is only used if no files
225           were specified at the command line
226
227       --default-search t
228           Specify the default file/dir search. defaults to './t', './t2', and
229           'test.pl'. The default search is only used if no files were
230           specified at the command line
231
232       --email foo@example.com
233           Email the test results (and any log file) to the specified email
234           address(es)
235
236       --email-from foo@example.com
237           If any email is sent, this is who it will be from
238
239       --email-owner
240           Email the owner of broken tests files upon failure. Add `# HARNESS-
241           META-OWNER foo@example.com` to the top of a test file to give it an
242           owner
243
244       --fork
245       --no-fork
246           (Default: on) fork to start tests
247
248           Do not fork to start tests
249
250           Test2::Harness normally forks to start a test. Forking can break
251           some select tests, this option will allow such tests to pass. This
252           is not compatible with the "preload" option. This is also
253           significantly slower. You can also add the "# HARNESS-NO-PRELOAD"
254           comment to the top of the test file to enable this on a per-test
255           basis.
256
257       --no-batch-owner-notices
258           Usually owner failures are sent as a single batch at the end of
259           testing. Toggle this to send failures as they happen.
260
261       --notify-text "custom"
262           Add a custom text snippet to email/slack notifications
263
264       --slack-log
265       --no-slack-log
266           Off by default, log file will be attached if available
267
268           Attach the event log to any slack notifications.
269
270       --slack-notify
271       --no-slack-notify
272           On by default if --slack-url is specified
273
274           Send slack notifications to the slack channels/users listed in test
275           meta-data when tests fail.
276
277       --slack-url "URL"
278           Specify an API endpoint for slack webhook integrations
279
280           This should be your slack webhook url.
281
282       --stream
283       --no-stream
284       --TAP
285       --tap
286           Use 'stream' instead of TAP (Default: use stream)
287
288           Do not use stream
289
290           Use TAP
291
292           The TAP format is lossy and clunky. Test2::Harness normally uses a
293           newer streaming format to receive test results. There are
294           old/legacy tests where this causes problems, in which case setting
295           --TAP or --no-stream can help.
296
297       --unsafe-inc
298       --no-unsafe-inc
299           (Default: On) put '.' in @INC
300
301           Do not put '.' in @INC
302
303           perl is removing '.' from @INC as a security concern. This option
304           keeps things from breaking for now.
305
306       -A
307       --author-testing
308       --no-author-testing
309           This will set the AUTHOR_TESTING environment to true
310
311           Many cpan modules have tests that are only run if the
312           AUTHOR_TESTING environment variable is set. This will cause those
313           tests to run.
314
315       -k
316       --keep-dir
317           Do not delete the work directory when done
318
319           This is useful if you want to inspect the work directory after the
320           harness is done. The work directory path will be printed at the
321           end.
322
323       -S SW
324       -S SW=val
325       --switch SW=val
326           Pass the specified switch to perl for each test
327
328           This is not compatible with preload.
329
330   Logging Options
331       -B
332       --bz2
333       --bzip2-log
334           Use bzip2 compression when writing the log
335
336           This option implies -L
337
338           .bz2 prefix is added to log file name for you
339
340       -F file.jsonl
341       --log-file FILE
342           Specify the name of the log file
343
344           This option implies -L
345
346           (Default: event_log-RUN_ID.jsonl)
347
348       -G
349       --gz
350       --gzip-log
351           Use gzip compression when writing the log
352
353           This option implies -L
354
355           .gz prefix is added to log file name for you
356
357       -L
358       --log
359           Turn on logging
360
361       --lff format-string
362       --log-file-format ...
363           Specify the format for automatically-generated log files.
364
365           Overridden by --log-file, if given
366
367           This option implies -L
368
369           (Default: $YATH_LOG_FILE_FORMAT, if that is set, or else
370           '%Y-%m-%d~%H:%M:%S~%!U~%!p.jsonl')
371
372           This is a string in which percent-escape sequences will be replaced
373           as per POSIX::strftime.  The following special escape sequences are
374           also replaced: (%!U : the unique test run ID)  (%!p : the process
375           ID) (%!S : the number of seconds since local midnight UTC
376
377   Display Options
378       --color
379       --no-color
380           Turn color on (Default: on)
381
382           Turn color off
383
384       --show-job-info
385       --no-show-job-info
386           Show the job configuration when a job starts
387
388           (Default: off, unless -vv)
389
390       --show-job-launch
391       --no-show-job-launch
392           Show output for the start of a job
393
394           (Default: off unless -v)
395
396       --show-run-info
397       --no-show-run-info
398           Show the run configuration when a run starts
399
400           (Default: off, unless -vv)
401
402       -q
403       --quiet
404           Be very quiet
405
406       -T
407       --show-times
408           Show the timing data for each job
409
410       -v
411       -vv
412       --verbose
413           Turn on verbose mode.
414
415           Specify multiple times to be more verbose.
416
417       --formatter Mod
418       --formatter +Mod
419           Specify the formatter to use
420
421           (Default: "Test2")
422
423           Only useful when a renderer is set to "Formatter". This specified
424           the Test2::Formatter::XXX that will be used to render the test
425           output.
426
427       --no-progress
428           Turn off progress indicators
429
430           This disables "events seen" counter and buffered event pre-display
431
432       --qvf
433           Quiet, but verbose on failure
434
435           Hide all output from tests when they pass, except to say they
436           passed. If a test fails then ALL output from the test is verbosely
437           output.
438
439       --show-job-end
440       --no-show-job-end
441           Show output when a job ends
442
443           (Default: on)
444
445           This is only used when the renderer is set to "Formatter"
446
447       -r +Module
448       -r Postfix
449       --renderer ...
450       -r +Module=arg1,arg2,...
451           Specify renderers
452
453           (Default: "Formatter")
454
455           Use "+" to give a fully qualified module name. Without "+"
456           "Test2::Harness::Renderer::" will be prepended to your argument.
457           You may specify custom arguments to the constructor after an "="
458           sign.
459
460   Plugins
461       -pPlugin
462       -pPlugin=arg1,arg2,...
463       -p+My::Plugin
464       --plugin Plugin
465           Load a plugin
466
467           can be specified multiple times
468
469       --no-plugins
470           cancel any plugins listed until now
471
472           This can be used to negate plugins specified in .yath.rc or similar
473

SOURCE

475       The source code repository for Test2-Harness can be found at
476       http://github.com/Test-More/Test2-Harness/.
477

MAINTAINERS

479       Chad Granum <exodist@cpan.org>
480

AUTHORS

482       Chad Granum <exodist@cpan.org>
483
485       Copyright 2019 Chad Granum <exodist7@gmail.com>.
486
487       This program is free software; you can redistribute it and/or modify it
488       under the same terms as Perl itself.
489
490       See http://dev.perl.org/licenses/
491
492
493
494perl v5.30.1                      2020-01-30       App::Yath::Command::test(3)
Impressum