1App::Yath::Command::tesUts(e3r)Contributed Perl DocumentAaptpi:o:nYath::Command::test(3)
2
3
4
6 App::Yath::Command::test - Run tests
7
9 This yath command (which is also the default command) will run all the
10 test files for the current project. If no test files are specified this
11 command will look for the 't', and 't2' directories, as well as the
12 'test.pl' file.
13
14 This command is always recursive when given directories.
15
16 This command will add 'lib', 'blib/arch' and 'blib/lib' to the perl
17 path for you by default (after any -I's). You can specify -l if you
18 just want lib, -b if you just want the blib paths. If you specify both
19 -l and -b both will be added in the order you specify (order relative
20 to any -I options will also be preserved. If you do not specify they
21 will be added in this order: -I's, lib, blib/lib, blib/arch. You can
22 also add --no-lib and --no-blib to avoid both.
23
24 Any command line argument that is not an option will be treated as a
25 test file or directory of test files to be run.
26
27 If you wish to specify the ARGV for tests you may append them after
28 '::'. This is mainly useful for Test::Class::Moose and similar tools.
29 EVERY test run will get the same ARGV.
30
32 $ yath [YATH OPTIONS] test [COMMAND OPTIONS]
33
34 YATH OPTIONS
35 Developer
36
37 --dev-lib
38 --dev-lib=lib
39 -D
40 -D=lib
41 -Dlib
42 --no-dev-lib
43 Add paths to @INC before loading ANYTHING. This is what you use if
44 you are developing yath or yath plugins to make sure the yath
45 script finds the local code instead of the installed versions of
46 the same code. You can provide an argument (-Dfoo) to provide a
47 custom path, or you can just use -D without and arg to add lib,
48 blib/lib and blib/arch.
49
50 Can be specified multiple times
51
52 Environment
53
54 --persist-dir ARG
55 --persist-dir=ARG
56 --no-persist-dir
57 Where to find persistence files.
58
59 --persist-file ARG
60 --persist-file=ARG
61 --pfile ARG
62 --pfile=ARG
63 --no-persist-file
64 Where to find the persistence file. The default is
65 /{system-tempdir}/project-yath-persist.json. If no project is
66 specified then it will fall back to the current directory. If the
67 current directory is not writable it will default to
68 /tmp/yath-persist.json which limits you to one persistent runner on
69 your system.
70
71 --project ARG
72 --project=ARG
73 --project-name ARG
74 --project-name=ARG
75 --no-project
76 This lets you provide a label for your current project/codebase.
77 This is best used in a .yath.rc file. This is necessary for a
78 persistent runner.
79
80 Finder Options
81
82 --finder MyFinder
83 --finder +Test2::Harness::Finder::MyFinder
84 --no-finder
85 Specify what Finder subclass to use when searching for
86 files/processing the file list. Use the "+" prefix to specify a
87 fully qualified namespace, otherwise Test2::Harness::Finder::XXX
88 namespace is assumed.
89
90 Help and Debugging
91
92 --show-opts
93 --no-show-opts
94 Exit after showing what yath thinks your options mean
95
96 --version
97 -V
98 --no-version
99 Exit after showing a helpful usage message
100
101 Plugins
102
103 --no-scan-plugins
104 --no-no-scan-plugins
105 Normally yath scans for and loads all App::Yath::Plugin::* modules
106 in order to bring in command-line options they may provide. This
107 flag will disable that. This is useful if you have a naughty plugin
108 that is loading other modules when it should not.
109
110 --plugins PLUGIN
111 --plugins +App::Yath::Plugin::PLUGIN
112 --plugins PLUGIN=arg1,arg2,...
113 --plugin PLUGIN
114 --plugin +App::Yath::Plugin::PLUGIN
115 --plugin PLUGIN=arg1,arg2,...
116 -pPLUGIN
117 --no-plugins
118 Load a yath plugin.
119
120 Can be specified multiple times
121
122 COMMAND OPTIONS
123 Collector Options
124
125 --max-open-jobs 18
126 --no-max-open-jobs
127 Maximum number of jobs a collector can process at a time, if more
128 jobs are pending their output will be delayed until the earlier
129 jobs have been processed. (Default: double the -j value)
130
131 --max-poll-events 1000
132 --no-max-poll-events
133 Maximum number of events to poll from a job before jumping to the
134 next job. (Default: 1000)
135
136 Cover Options
137
138 --cover-aggregator ByTest
139 --cover-aggregator ByRun
140 --cover-aggregator +Custom::Aggregator
141 --cover-agg ByTest
142 --cover-agg ByRun
143 --cover-agg +Custom::Aggregator
144 --no-cover-aggregator
145 Choose a custom aggregator subclass
146
147 --cover-class ARG
148 --cover-class=ARG
149 --no-cover-class
150 Choose a Test2::Plugin::Cover subclass
151
152 --cover-dirs ARG
153 --cover-dirs=ARG
154 --cover-dir ARG
155 --cover-dir=ARG
156 --no-cover-dirs
157 NO DESCRIPTION - FIX ME
158
159 Can be specified multiple times
160
161 --cover-exclude-private
162 --no-cover-exclude-private
163 --cover-files
164 --no-cover-files
165 Use Test2::Plugin::Cover to collect coverage data for what files
166 are touched by what tests. Unlike Devel::Cover this has very little
167 performance impact (About 4% difference)
168
169 --cover-from path/to/log.jsonl
170 --cover-from http://example.com/coverage
171 --cover-from path/to/coverage.jsonl
172 --no-cover-from
173 This can be a test log, a coverage dump (old style json or new
174 jsonl format), or a url to any of the previous. Tests will not be
175 run if the file/url is invalid.
176
177 --cover-from-type json
178 --cover-from-type jsonl
179 --cover-from-type log
180 --no-cover-from-type
181 File type for coverage source. Usually it can be detected, but when
182 it cannot be you should specify. "json" is old style single-blob
183 coverage data, "jsonl" is the new by-test style, "log" is a logfile
184 from a previous run.
185
186 --cover-manager My::Coverage::Manager
187 --no-cover-manager
188 Coverage 'from' manager to use when coverage data does not provide
189 one
190
191 --cover-maybe-from path/to/log.jsonl
192 --cover-maybe-from http://example.com/coverage
193 --cover-maybe-from path/to/coverage.jsonl
194 --no-cover-maybe-from
195 This can be a test log, a coverage dump (old style json or new
196 jsonl format), or a url to any of the previous. Tests will coninue
197 if even if the coverage file/url is invalid.
198
199 --cover-maybe-from-type json
200 --cover-maybe-from-type jsonl
201 --cover-maybe-from-type log
202 --no-cover-maybe-from-type
203 Same as "from_type" but for "maybe_from". Defaults to "from_type"
204 if that is specified, otherwise auto-detect
205
206 --cover-metrics
207 --no-cover-metrics
208 --cover-types ARG
209 --cover-types=ARG
210 --cover-type ARG
211 --cover-type=ARG
212 --no-cover-types
213 NO DESCRIPTION - FIX ME
214
215 Can be specified multiple times
216
217 --cover-write
218 --cover-write=coverage.jsonl
219 --cover-write=coverage.json
220 --no-cover-write
221 Create a json or jsonl file of all coverage data seen during the
222 run (This implies --cover-files).
223
224 Display Options
225
226 --color
227 --no-color
228 Turn color on, default is true if STDOUT is a TTY.
229
230 --hide-runner-output
231 --no-hide-runner-output
232 Hide output from the runner, showing only test output. (See Also
233 truncate_runner_output)
234
235 --no-wrap
236 --no-no-wrap
237 Do not do fancy text-wrapping, let the terminal handle it
238
239 --progress
240 --no-progress
241 Toggle progress indicators. On by default if STDOUT is a TTY. You
242 can use --no-progress to disable the 'events seen' counter and
243 buffered event pre-display
244
245 --quiet
246 -q
247 --no-quiet
248 Be very quiet.
249
250 Can be specified multiple times
251
252 --renderers +My::Renderer
253 --renderers Renderer=arg1,arg2,...
254 --renderer +My::Renderer
255 --renderer Renderer=arg1,arg2,...
256 --no-renderers
257 Specify renderers, (Default: "Formatter=Test2"). Use "+" to give a
258 fully qualified module name. Without "+"
259 "Test2::Harness::Renderer::" will be prepended to your argument.
260
261 Can be specified multiple times. If the same key is listed multiple
262 times the value lists will be appended together.
263
264 --show-times
265 -T
266 --no-show-times
267 Show the timing data for each job
268
269 --term-width 80
270 --term-width 200
271 --term-size 80
272 --term-size 200
273 --no-term-width
274 Alternative to setting $TABLE_TERM_SIZE. Setting this will override
275 the terminal width detection to the number of characters specified.
276
277 --truncate-runner-output
278 --no-truncate-runner-output
279 Only show runner output that was generated after the current
280 command. This is only useful with a persistent runner.
281
282 --verbose
283 -v
284 --no-verbose
285 Be more verbose
286
287 Can be specified multiple times
288
289 Finder Options
290
291 --changed path/to/file
292 --no-changed
293 Specify one or more files as having been changed.
294
295 Can be specified multiple times
296
297 --changed-only
298 --no-changed-only
299 Only search for tests for changed files (Requires a coverage data
300 source, also requires a list of changes either from the --changed
301 option, or a plugin that implements changed_files() or
302 changed_diff())
303
304 --changes-diff path/to/diff.diff
305 --no-changes-diff
306 Path to a diff file that should be used to find changed files for
307 use with --changed-only. This must be in the same format as `git
308 diff -W --minimal -U1000000`
309
310 --changes-exclude-file path/to/file
311 --no-changes-exclude-file
312 Specify one or more files to ignore when looking at changes
313
314 Can be specified multiple times
315
316 --changes-exclude-loads
317 --no-changes-exclude-loads
318 Exclude coverage tests which only load changed files, but never
319 call code from them. (default: off)
320
321 --changes-exclude-nonsub
322 --no-changes-exclude-nonsub
323 Exclude changes outside of subroutines (perl files only) (default:
324 off)
325
326 --changes-exclude-opens
327 --no-changes-exclude-opens
328 Exclude coverage tests which only open() changed files, but never
329 call code from them. (default: off)
330
331 --changes-exclude-pattern '(apple|pear|orange)'
332 --no-changes-exclude-pattern
333 Ignore files matching this pattern when looking for changes. Your
334 pattern will be inserted unmodified into a `$file =~ m/$pattern/`
335 check.
336
337 Can be specified multiple times
338
339 --changes-filter-file path/to/file
340 --no-changes-filter-file
341 Specify one or more files to check for changes. Changes to other
342 files will be ignored
343
344 Can be specified multiple times
345
346 --changes-filter-pattern '(apple|pear|orange)'
347 --no-changes-filter-pattern
348 Specify a pattern for change checking. When only running tests for
349 changed files this will limit which files are checked for changes.
350 Only files that match this pattern will be checked. Your pattern
351 will be inserted unmodified into a `$file =~ m/$pattern/` check.
352
353 Can be specified multiple times
354
355 --changes-include-whitespace
356 --no-changes-include-whitespace
357 Include changed lines that are whitespace only (default: off)
358
359 --changes-plugin Git
360 --changes-plugin +App::Yath::Plugin::Git
361 --no-changes-plugin
362 What plugin should be used to detect changed files.
363
364 --default-at-search ARG
365 --default-at-search=ARG
366 --no-default-at-search
367 Specify the default file/dir search when 'AUTHOR_TESTING' is set.
368 Defaults to './xt'. The default AT search is only used if no files
369 were specified at the command line
370
371 Can be specified multiple times
372
373 --default-search ARG
374 --default-search=ARG
375 --no-default-search
376 Specify the default file/dir search. defaults to './t', './t2', and
377 'test.pl'. The default search is only used if no files were
378 specified at the command line
379
380 Can be specified multiple times
381
382 --durations file.json
383 --durations http://example.com/durations.json
384 --no-durations
385 Point at a json file or url which has a hash of relative test
386 filenames as keys, and 'SHORT', 'MEDIUM', or 'LONG' as values. This
387 will override durations listed in the file headers. An exception
388 will be thrown if the durations file or url does not work.
389
390 --durations-threshold ARG
391 --durations-threshold=ARG
392 --Dt ARG
393 --Dt=ARG
394 --no-durations-threshold
395 Only fetch duration data if running at least this number of tests.
396 Default (-j value + 1)
397
398 --exclude-file t/nope.t
399 --no-exclude-file
400 Exclude a file from testing
401
402 Can be specified multiple times
403
404 --exclude-list file.txt
405 --exclude-list http://example.com/exclusions.txt
406 --no-exclude-list
407 Point at a file or url which has a new line separated list of test
408 file names to exclude from testing. Starting a line with a '#' will
409 comment it out (for compatibility with Test2::Aggregate list
410 files).
411
412 Can be specified multiple times
413
414 --exclude-pattern t/nope.t
415 --no-exclude-pattern
416 Exclude a pattern from testing, matched using m/$PATTERN/
417
418 Can be specified multiple times
419
420 --extension ARG
421 --extension=ARG
422 --ext ARG
423 --ext=ARG
424 --no-extension
425 Specify valid test filename extensions, default: t and t2
426
427 Can be specified multiple times
428
429 --maybe-durations file.json
430 --maybe-durations http://example.com/durations.json
431 --no-maybe-durations
432 Point at a json file or url which has a hash of relative test
433 filenames as keys, and 'SHORT', 'MEDIUM', or 'LONG' as values. This
434 will override durations listed in the file headers. An exception
435 will be thrown if the durations file or url does not work.
436
437 --no-long
438 --no-no-long
439 Do not run tests that have their duration flag set to 'LONG'
440
441 --only-long
442 --no-only-long
443 Only run tests that have their duration flag set to 'LONG'
444
445 --rerun
446 --rerun=path/to/log.jsonl
447 --rerun=plugin_specific_string
448 --no-rerun
449 Re-Run tests from a previous run from a log file (or last log
450 file). Plugins can intercept this, such as YathUIDB which will grab
451 a run UUID and derive tests to re-run from that.
452
453 --rerun-all
454 --rerun-all=path/to/log.jsonl
455 --rerun-all=plugin_specific_string
456 --no-rerun-all
457 Re-Run all tests from a previous run from a log file (or last log
458 file). Plugins can intercept this, such as YathUIDB which will grab
459 a run UUID and derive tests to re-run from that.
460
461 --rerun-failed
462 --rerun-failed=path/to/log.jsonl
463 --rerun-failed=plugin_specific_string
464 --no-rerun-failed
465 Re-Run failed tests from a previous run from a log file (or last
466 log file). Plugins can intercept this, such as YathUIDB which will
467 grab a run UUID and derive tests to re-run from that.
468
469 --rerun-missed
470 --rerun-missed=path/to/log.jsonl
471 --rerun-missed=plugin_specific_string
472 --no-rerun-missed
473 Run missed tests from a previously aborted/stopped run from a log
474 file (or last log file). Plugins can intercept this, such as
475 YathUIDB which will grab a run UUID and derive tests to re-run from
476 that.
477
478 --rerun-modes failed,missed,...
479 --rerun-modes all
480 --rerun-modes failed
481 --rerun-modes missed
482 --rerun-modes passed
483 --rerun-modes retried
484 --rerun-mode failed,missed,...
485 --rerun-mode all
486 --rerun-mode failed
487 --rerun-mode missed
488 --rerun-mode passed
489 --rerun-mode retried
490 --no-rerun-modes
491 Pick which test categories to run
492
493 Can be specified multiple times
494
495 --rerun-passed
496 --rerun-passed=path/to/log.jsonl
497 --rerun-passed=plugin_specific_string
498 --no-rerun-passed
499 Re-Run passed tests from a previous run from a log file (or last
500 log file). Plugins can intercept this, such as YathUIDB which will
501 grab a run UUID and derive tests to re-run from that.
502
503 --rerun-plugin Foo
504 --rerun-plugin +App::Yath::Plugin::Foo
505 --no-rerun-plugin
506 What plugin(s) should be used for rerun (will fallback to other
507 plugins if the listed ones decline the value, this is just used ot
508 set an order of priority)
509
510 Can be specified multiple times
511
512 --rerun-retried
513 --rerun-retried=path/to/log.jsonl
514 --rerun-retried=plugin_specific_string
515 --no-rerun-retried
516 Re-Run retried tests from a previous run from a log file (or last
517 log file). Plugins can intercept this, such as YathUIDB which will
518 grab a run UUID and derive tests to re-run from that.
519
520 --search ARG
521 --search=ARG
522 --no-search
523 List of tests and test directories to use instead of the default
524 search paths. Typically these can simply be listed as command line
525 arguments without the --search prefix.
526
527 Can be specified multiple times
528
529 --show-changed-files
530 --no-show-changed-files
531 Print a list of changed files if any are found
532
533 Formatter Options
534
535 --formatter ARG
536 --formatter=ARG
537 --no-formatter
538 NO DESCRIPTION - FIX ME
539
540 --qvf
541 --no-qvf
542 [Q]uiet, but [V]erbose on [F]ailure. Hide all output from tests
543 when they pass, except to say they passed. If a test fails then ALL
544 output from the test is verbosely output.
545
546 --show-job-end
547 --no-show-job-end
548 Show output when a job ends. (Default: on)
549
550 --show-job-info
551 --no-show-job-info
552 Show the job configuration when a job starts. (Default: off, unless
553 -vv)
554
555 --show-job-launch
556 --no-show-job-launch
557 Show output for the start of a job. (Default: off unless -v)
558
559 --show-run-info
560 --no-show-run-info
561 Show the run configuration when a run starts. (Default: off, unless
562 -vv)
563
564 Git Options
565
566 --git-change-base master
567 --git-change-base HEAD^
568 --git-change-base df22abe4
569 --no-git-change-base
570 Find files changed by all commits in the current branch from most
571 recent stopping when a commit is found that is also present in the
572 history of the branch/commit specified as the change base.
573
574 Help and Debugging
575
576 --dummy
577 -d
578 --no-dummy
579 Dummy run, do not actually execute anything
580
581 Can also be set with the following environment variables:
582 "T2_HARNESS_DUMMY"
583
584 --help
585 -h
586 --no-help
587 exit after showing help information
588
589 --interactive
590 -i
591 --no-interactive
592 Use interactive mode, 1 test at a time, stdin forwarded to it
593
594 --keep-dirs
595 --keep_dir
596 -k
597 --no-keep-dirs
598 Do not delete directories when done. This is useful if you want to
599 inspect the directories used for various commands.
600
601 --procname-prefix ARG
602 --procname-prefix=ARG
603 --no-procname-prefix
604 Add a prefix to all proc names (as seen by ps).
605
606 --summary
607 --summary=/path/to/summary.json
608 --no-summary
609 Write out a summary json file, if no path is provided
610 'summary.json' will be used. The .json extension is added
611 automatically if omitted.
612
613 Logging Options
614
615 --bzip2
616 --bz2
617 --bzip2_log
618 -B
619 --no-bzip2
620 Use bzip2 compression when writing the log. This option implies -L.
621 The .bz2 prefix is added to log file name for you
622
623 --gzip
624 --gz
625 --gzip_log
626 -G
627 --no-gzip
628 Use gzip compression when writing the log. This option implies -L.
629 The .gz prefix is added to log file name for you
630
631 --log
632 -L
633 --no-log
634 Turn on logging
635
636 --log-dir ARG
637 --log-dir=ARG
638 --no-log-dir
639 Specify a log directory. Will fall back to the system temp dir.
640
641 --log-file ARG
642 --log-file=ARG
643 -F ARG
644 -F=ARG
645 --no-log-file
646 Specify the name of the log file. This option implies -L.
647
648 --log-file-format ARG
649 --log-file-format=ARG
650 --lff ARG
651 --lff=ARG
652 --no-log-file-format
653 Specify the format for automatically-generated log files.
654 Overridden by --log-file, if given. This option implies -L
655 (Default: \$YATH_LOG_FILE_FORMAT, if that is set, or else
656 "%!P%Y-%m-%d~%H:%M:%S~%!U~%!p.jsonl"). This is a string in which
657 percent-escape sequences will be replaced as per POSIX::strftime.
658 The following special escape sequences are also replaced: (%!P :
659 Project name followed by a ~, if a project is defined, otherwise
660 empty string) (%!U : the unique test run ID) (%!p : the process ID)
661 (%!S : the number of seconds since local midnight UTC)
662
663 Can also be set with the following environment variables:
664 "YATH_LOG_FILE_FORMAT", "TEST2_HARNESS_LOG_FORMAT"
665
666 Notification Options
667
668 --notify-email foo@example.com
669 --no-notify-email
670 Email the test results to the specified email address(es)
671
672 Can be specified multiple times
673
674 --notify-email-fail foo@example.com
675 --no-notify-email-fail
676 Email failing results to the specified email address(es)
677
678 Can be specified multiple times
679
680 --notify-email-from foo@example.com
681 --no-notify-email-from
682 If any email is sent, this is who it will be from
683
684 --notify-email-owner
685 --no-notify-email-owner
686 Email the owner of broken tests files upon failure. Add `# HARNESS-
687 META-OWNER foo@example.com` to the top of a test file to give it an
688 owner
689
690 --notify-no-batch-email
691 --no-notify-no-batch-email
692 Usually owner failures are sent as a single batch at the end of
693 testing. Toggle this to send failures as they happen.
694
695 --notify-no-batch-slack
696 --no-notify-no-batch-slack
697 Usually owner failures are sent as a single batch at the end of
698 testing. Toggle this to send failures as they happen.
699
700 --notify-slack '#foo'
701 --notify-slack '@bar'
702 --no-notify-slack
703 Send results to a slack channel and/or user
704
705 Can be specified multiple times
706
707 --notify-slack-fail '#foo'
708 --notify-slack-fail '@bar'
709 --no-notify-slack-fail
710 Send failing results to a slack channel and/or user
711
712 Can be specified multiple times
713
714 --notify-slack-owner
715 --no-notify-slack-owner
716 Send slack notifications to the slack channels/users listed in test
717 meta-data when tests fail.
718
719 --notify-slack-url https://hooks.slack.com/...
720 --no-notify-slack-url
721 Specify an API endpoint for slack webhook integrations
722
723 --notify-text ARG
724 --notify-text=ARG
725 --message ARG
726 --message=ARG
727 --msg ARG
728 --msg=ARG
729 --no-notify-text
730 Add a custom text snippet to email/slack notifications
731
732 --notify-text-module ARG
733 --notify-text-module=ARG
734 --message_module ARG
735 --message_module=ARG
736 --no-notify-text-module
737 Use the specified module to generate messages for emails and/or
738 slack.
739
740 Run Options
741
742 --author-testing
743 -A
744 --no-author-testing
745 This will set the AUTHOR_TESTING environment to true
746
747 --dbi-profiling
748 --no-dbi-profiling
749 Use Test2::Plugin::DBIProfile to collect database profiling data
750
751 --env-var VAR=VAL
752 -EVAR=VAL
753 -E VAR=VAL
754 --no-env-var
755 Set environment variables to set when each test is run.
756
757 Can be specified multiple times
758
759 --event-uuids
760 --uuids
761 --no-event-uuids
762 Use Test2::Plugin::UUID inside tests (default: on)
763
764 --fields name:details
765 --fields JSON_STRING
766 -f name:details
767 -f JSON_STRING
768 --no-fields
769 Add custom data to the harness run
770
771 Can be specified multiple times
772
773 --input ARG
774 --input=ARG
775 --no-input
776 Input string to be used as standard input for ALL tests. See also:
777 --input-file
778
779 --input-file ARG
780 --input-file=ARG
781 --no-input-file
782 Use the specified file as standard input to ALL tests
783
784 --io-events
785 --no-io-events
786 Use Test2::Plugin::IOEvents inside tests to turn all prints into
787 test2 events (default: off)
788
789 --link 'https://travis.work/builds/42'
790 --link 'https://jenkins.work/job/42'
791 --link 'https://buildbot.work/builders/foo/builds/42'
792 --no-link
793 Provide one or more links people can follow to see more about this
794 run.
795
796 Can be specified multiple times
797
798 --load ARG
799 --load=ARG
800 --load-module ARG
801 --load-module=ARG
802 -m ARG
803 -m=ARG
804 --no-load
805 Load a module in each test (after fork). The "import" method is not
806 called.
807
808 Can be specified multiple times
809
810 --load-import Module
811 --load-import Module=import_arg1,arg2,...
812 --loadim Module
813 --loadim Module=import_arg1,arg2,...
814 -M Module
815 -M Module=import_arg1,arg2,...
816 --no-load-import
817 Load a module in each test (after fork). Import is called.
818
819 Can be specified multiple times. If the same key is listed multiple
820 times the value lists will be appended together.
821
822 --mem-usage
823 --no-mem-usage
824 Use Test2::Plugin::MemUsage inside tests (default: on)
825
826 --retry ARG
827 --retry=ARG
828 -r ARG
829 -r=ARG
830 --no-retry
831 Run any jobs that failed a second time. NOTE: --retry=1 means
832 failing tests will be attempted twice!
833
834 --retry-isolated
835 --retry-iso
836 --no-retry-isolated
837 If true then any job retries will be done in isolation (as though
838 -j1 was set)
839
840 --run-id
841 --id
842 --no-run-id
843 Set a specific run-id. (Default: a UUID)
844
845 --test-args ARG
846 --test-args=ARG
847 --no-test-args
848 Arguments to pass in as @ARGV for all tests that are run. These can
849 be provided easier using the '::' argument separator.
850
851 Can be specified multiple times
852
853 --stream
854 --no-stream
855 Use the stream formatter (default is on)
856
857 --tap
858 --TAP
859 ----no-stream
860 --no-tap
861 The TAP format is lossy and clunky. Test2::Harness normally uses a
862 newer streaming format to receive test results. There are
863 old/legacy tests where this causes problems, in which case setting
864 --TAP or --no-stream can help.
865
866 Runner Options
867
868 --abort-on-bail
869 --no-abort-on-bail
870 Abort all testing if a bail-out is encountered (default: on)
871
872 --blib
873 -b
874 --no-blib
875 (Default: include if it exists) Include 'blib/lib' and 'blib/arch'
876 in your module path
877
878 --cover
879 --cover=-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
880 --no-cover
881 Use Devel::Cover to calculate test coverage. This disables forking.
882 If no args are specified the following are used:
883 -silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
884
885 --dump-depmap
886 --no-dump-depmap
887 When using staged preload, dump the depmap for each stage as json
888 files
889
890 --event-timeout SECONDS
891 --et SECONDS
892 --no-event-timeout
893 Kill test if no output is received within timeout period. (Default:
894 60 seconds). Add the "# HARNESS-NO-TIMEOUT" comment to the top of a
895 test file to disable timeouts on a per-test basis. This prevents a
896 hung test from running forever.
897
898 --include ARG
899 --include=ARG
900 -I ARG
901 -I=ARG
902 --no-include
903 Add a directory to your include paths
904
905 Can be specified multiple times
906
907 --job-count 4
908 --job-count 8:2
909 --jobs 4
910 --jobs 8:2
911 -j4
912 -j8:2
913 --no-job-count
914 Set the number of concurrent jobs to run. Add a :# if you also wish
915 to designate multiple slots per test. 8:2 means 8 slots, but each
916 test gets 2 slots, so 4 tests run concurrently. Tests can find
917 their concurrency assignemnt in the "T2_HARNESS_MY_JOB_CONCURRENCY"
918 environment variable.
919
920 Can also be set with the following environment variables:
921 "YATH_JOB_COUNT", "T2_HARNESS_JOB_COUNT", "HARNESS_JOB_COUNT"
922
923 --lib
924 -l
925 --no-lib
926 (Default: include if it exists) Include 'lib' in your module path
927
928 --nytprof
929 --no-nytprof
930 Use Devel::NYTProf on tests. This will set addpid=1 for you. This
931 works with or without fork.
932
933 --post-exit-timeout SECONDS
934 --pet SECONDS
935 --no-post-exit-timeout
936 Stop waiting post-exit after the timeout period. (Default: 15
937 seconds) Some tests fork and allow the parent to exit before
938 writing all their output. If Test2::Harness detects an incomplete
939 plan after the test exits it will monitor for more events until the
940 timeout period. Add the "# HARNESS-NO-TIMEOUT" comment to the top
941 of a test file to disable timeouts on a per-test basis.
942
943 --preload-threshold ARG
944 --preload-threshold=ARG
945 --Pt ARG
946 --Pt=ARG
947 -W ARG
948 -W=ARG
949 --no-preload-threshold
950 Only do preload if at least N tests are going to be run. In some
951 cases a full preload takes longer than simply running the tests,
952 this lets you specify a minimum number of test jobs that will be
953 run for preload to happen. This has no effect for a persistent
954 runner. The default is 0, and it means always preload.
955
956 --preloads ARG
957 --preloads=ARG
958 --preload ARG
959 --preload=ARG
960 -P ARG
961 -P=ARG
962 --no-preloads
963 Preload a module before running tests
964
965 Can be specified multiple times
966
967 --resource Port
968 --resource +Test2::Harness::Runner::Resource::Port
969 -R Port
970 --no-resource
971 Use a resource module to assign resource assignments to individual
972 tests
973
974 Can be specified multiple times
975
976 --runner-id ARG
977 --runner-id=ARG
978 --no-runner-id
979 Runner ID (usually a generated uuid)
980
981 --shared-jobs-config .sharedjobslots.yml
982 --shared-jobs-config relative/path/.sharedjobslots.yml
983 --shared-jobs-config /absolute/path/.sharedjobslots.yml
984 --no-shared-jobs-config
985 Where to look for a shared slot config file. If a filename with no
986 path is provided yath will search the current and all parent
987 directories for the name.
988
989 --slots-per-job 2
990 -x2
991 --no-slots-per-job
992 This sets the number of slots each job will use (default 1). This
993 is normally set by the ':#' in '-j#:#'.
994
995 Can also be set with the following environment variables:
996 "T2_HARNESS_JOB_CONCURRENCY"
997
998 --switch ARG
999 --switch=ARG
1000 -S ARG
1001 -S=ARG
1002 --no-switch
1003 Pass the specified switch to perl for each test. This is not
1004 compatible with preload.
1005
1006 Can be specified multiple times
1007
1008 --tlib
1009 --no-tlib
1010 (Default: off) Include 't/lib' in your module path
1011
1012 --unsafe-inc
1013 --no-unsafe-inc
1014 perl is removing '.' from @INC as a security concern. This option
1015 keeps things from breaking for now.
1016
1017 Can also be set with the following environment variables:
1018 "PERL_USE_UNSAFE_INC"
1019
1020 --use-fork
1021 --fork
1022 --no-use-fork
1023 (default: on, except on windows) Normally tests are run by forking,
1024 which allows for features like preloading. This will turn off the
1025 behavior globally (which is not compatible with preloading). This
1026 is slower, it is better to tag misbehaving tests with the '#
1027 HARNESS-NO-PRELOAD' comment in their header to disable forking only
1028 for those tests.
1029
1030 Can also be set with the following environment variables:
1031 "!T2_NO_FORK", "T2_HARNESS_FORK", "!T2_HARNESS_NO_FORK",
1032 "YATH_FORK", "!YATH_NO_FORK"
1033
1034 --use-timeout
1035 --timeout
1036 --no-use-timeout
1037 (default: on) Enable/disable timeouts
1038
1039 Workspace Options
1040
1041 --clear
1042 -C
1043 --no-clear
1044 Clear the work directory if it is not already empty
1045
1046 --tmp-dir ARG
1047 --tmp-dir=ARG
1048 --tmpdir ARG
1049 --tmpdir=ARG
1050 -t ARG
1051 -t=ARG
1052 --no-tmp-dir
1053 Use a specific temp directory (Default: use system temp dir)
1054
1055 Can also be set with the following environment variables:
1056 "T2_HARNESS_TEMP_DIR", "YATH_TEMP_DIR", "TMPDIR", "TEMPDIR",
1057 "TMP_DIR", "TEMP_DIR"
1058
1059 --workdir ARG
1060 --workdir=ARG
1061 -w ARG
1062 -w=ARG
1063 --no-workdir
1064 Set the work directory (Default: new temp directory)
1065
1066 Can also be set with the following environment variables:
1067 "T2_WORKDIR", "YATH_WORKDIR"
1068
1069 YathUI Options
1070
1071 --yathui-api-key ARG
1072 --yathui-api-key=ARG
1073 --no-yathui-api-key
1074 Yath-UI API key. This is not necessary if your Yath-UI instance is
1075 set to single-user
1076
1077 --yathui-coverage
1078 --no-yathui-coverage
1079 Poll coverage data from Yath-UI to determine what tests should be
1080 run for changed files
1081
1082 --yathui-db
1083 --no-yathui-db
1084 Add the YathUI DB renderer in addition to other renderers
1085
1086 --yathui-durations
1087 --no-yathui-durations
1088 Poll duration data from Yath-UI to help order tests efficiently
1089
1090 --yathui-grace
1091 --no-yathui-grace
1092 If yath cannot connect to yath-ui it normally throws an error, use
1093 this to make it fail gracefully. You get a warning, but things keep
1094 going.
1095
1096 --yathui-long-duration 10
1097 --no-yathui-long-duration
1098 Minimum duration length (seconds) before a test goes from MEDIUM to
1099 LONG
1100
1101 --yathui-medium-duration 5
1102 --no-yathui-medium-duration
1103 Minimum duration length (seconds) before a test goes from SHORT to
1104 MEDIUM
1105
1106 --yathui-mode summary
1107 --yathui-mode qvf
1108 --yathui-mode qvfd
1109 --yathui-mode complete
1110 --no-yathui-mode
1111 Set the upload mode (default 'qvfd')
1112
1113 --yathui-only
1114 --no-yathui-only
1115 Only use the YathUI renderer
1116
1117 --yathui-only-db
1118 --no-yathui-only-db
1119 Only use the YathUI DB renderer
1120
1121 --yathui-port 8080
1122 --no-yathui-port
1123 Port to use when running a local server
1124
1125 --yathui-port-command get_port.sh
1126 --yathui-port-command get_port.sh --pid $$
1127 --no-yathui-port-command
1128 Use a command to get a port number. "$$" will be replaced with the
1129 PID of the yath process
1130
1131 --yathui-project ARG
1132 --yathui-project=ARG
1133 --no-yathui-project
1134 The Yath-UI project for your test results
1135
1136 --yathui-render
1137 --no-yathui-render
1138 Add the YathUI renderer in addition to other renderers
1139
1140 --yathui-resources
1141 --yathui-resources=5
1142 --no-yathui-resources
1143 Send resource info (for supported resources) to yathui at the
1144 specified interval in seconds (5 if not specified)
1145
1146 --yathui-retry
1147 --no-yathui-retry
1148 How many times to try an operation before giving up
1149
1150 Can be specified multiple times
1151
1152 --yathui-schema PostgreSQL
1153 --yathui-schema MySQL
1154 --yathui-schema MySQL56
1155 --no-yathui-schema
1156 What type of DB/schema to use when using a temporary database
1157
1158 --yathui-upload
1159 --no-yathui-upload
1160 Upload the log to Yath-UI
1161
1162 --yathui-url http://my-yath-ui.com/...
1163 --uri http://my-yath-ui.com/...
1164 --no-yathui-url
1165 Yath-UI url
1166
1167 --yathui-user ARG
1168 --yathui-user=ARG
1169 --no-yathui-user
1170 Username to attach to the data sent to the db
1171
1172 --yathui-db-buffering none
1173 --yathui-db-buffering job
1174 --yathui-db-buffering diag
1175 --yathui-db-buffering run
1176 --no-yathui-db-buffering
1177 Type of buffering to use, if "none" then events are written to the
1178 db one at a time, which is SLOW
1179
1180 --yathui-db-config ARG
1181 --yathui-db-config=ARG
1182 --no-yathui-db-config
1183 Module that implements 'MODULE->yath_ui_config(%params)' which
1184 should return a Test2::Harness::UI::Config instance.
1185
1186 --yathui-db-coverage
1187 --no-yathui-db-coverage
1188 Pull coverage data directly from the database (default: off)
1189
1190 --yathui-db-driver Pg
1191 --yathui-db-drivermysql
1192 --yathui-db-driverMariaDB
1193 --no-yathui-db-driver
1194 DBI Driver to use
1195
1196 --yathui-db-dsn ARG
1197 --yathui-db-dsn=ARG
1198 --no-yathui-db-dsn
1199 DSN to use when connecting to the db
1200
1201 --yathui-db-duration-limit ARG
1202 --yathui-db-duration-limit=ARG
1203 --no-yathui-db-duration-limit
1204 Limit the number of runs to look at for durations data (default:
1205 10)
1206
1207 --yathui-db-durations
1208 --no-yathui-db-durations
1209 Pull duration data directly from the database (default: off)
1210
1211 --yathui-db-flush-interval 2
1212 --yathui-db-flush-interval 1.5
1213 --no-yathui-db-flush-interval
1214 When buffering DB writes, force a flush when an event is recieved
1215 at least N seconds after the last flush.
1216
1217 --yathui-db-host ARG
1218 --yathui-db-host=ARG
1219 --no-yathui-db-host
1220 hostname to use when connecting to the db
1221
1222 --yathui-db-name ARG
1223 --yathui-db-name=ARG
1224 --no-yathui-db-name
1225 Name of the database to use for yathui
1226
1227 --yathui-db-pass ARG
1228 --yathui-db-pass=ARG
1229 --no-yathui-db-pass
1230 Password to use when connecting to the db
1231
1232 --yathui-db-port ARG
1233 --yathui-db-port=ARG
1234 --no-yathui-db-port
1235 port to use when connecting to the db
1236
1237 --yathui-db-publisher ARG
1238 --yathui-db-publisher=ARG
1239 --no-yathui-db-publisher
1240 When using coverage or duration data, only use data uploaded by
1241 this user
1242
1243 --yathui-db-socket ARG
1244 --yathui-db-socket=ARG
1245 --no-yathui-db-socket
1246 socket to use when connecting to the db
1247
1248 --yathui-db-user ARG
1249 --yathui-db-user=ARG
1250 --no-yathui-db-user
1251 Username to use when connecting to the db
1252
1254 The source code repository for Test2-Harness can be found at
1255 http://github.com/Test-More/Test2-Harness/.
1256
1258 Chad Granum <exodist@cpan.org>
1259
1261 Chad Granum <exodist@cpan.org>
1262
1264 Copyright 2023 Chad Granum <exodist7@gmail.com>.
1265
1266 This program is free software; you can redistribute it and/or modify it
1267 under the same terms as Perl itself.
1268
1269 See http://dev.perl.org/licenses/
1270
1271
1272
1273perl v5.36.1 2023-10-04 App::Yath::Command::test(3)