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 it 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-failed
454 --rerun-failed=path/to/log.jsonl
455 --rerun-failed=plugin_specific_string
456 --no-rerun-failed
457 Re-Run failed tests from a previous run from a log file (or last
458 log file). Plugins can intercept this, such as YathUIDB which will
459 grab a run UUID and derive tests to re-run from that.
460
461 --rerun-plugin Foo
462 --rerun-plugin +App::Yath::Plugin::Foo
463 --no-rerun-plugin
464 What plugin(s) should be used for rerun (will fallback to other
465 plugins if the listed ones decline the value, this is just used ot
466 set an order of priority)
467
468 Can be specified multiple times
469
470 --search ARG
471 --search=ARG
472 --no-search
473 List of tests and test directories to use instead of the default
474 search paths. Typically these can simply be listed as command line
475 arguments without the --search prefix.
476
477 Can be specified multiple times
478
479 --show-changed-files
480 --no-show-changed-files
481 Print a list of changed files if any are found
482
483 Formatter Options
484
485 --formatter ARG
486 --formatter=ARG
487 --no-formatter
488 NO DESCRIPTION - FIX ME
489
490 --qvf
491 --no-qvf
492 [Q]uiet, but [V]erbose on [F]ailure. Hide all output from tests
493 when they pass, except to say they passed. If a test fails then ALL
494 output from the test is verbosely output.
495
496 --show-job-end
497 --no-show-job-end
498 Show output when a job ends. (Default: on)
499
500 --show-job-info
501 --no-show-job-info
502 Show the job configuration when a job starts. (Default: off, unless
503 -vv)
504
505 --show-job-launch
506 --no-show-job-launch
507 Show output for the start of a job. (Default: off unless -v)
508
509 --show-run-info
510 --no-show-run-info
511 Show the run configuration when a run starts. (Default: off, unless
512 -vv)
513
514 Git Options
515
516 --git-change-base master
517 --git-change-base HEAD^
518 --git-change-base df22abe4
519 --no-git-change-base
520 Find files changed by all commits in the current branch from most
521 recent stopping when a commit is found that is also present in the
522 history of the branch/commit specified as the change base.
523
524 Help and Debugging
525
526 --dummy
527 -d
528 --no-dummy
529 Dummy run, do not actually execute anything
530
531 Can also be set with the following environment variables:
532 "T2_HARNESS_DUMMY"
533
534 --help
535 -h
536 --no-help
537 exit after showing help information
538
539 --interactive
540 -i
541 --no-interactive
542 Use interactive mode, 1 test at a time, stdin forwarded to it
543
544 --keep-dirs
545 --keep_dir
546 -k
547 --no-keep-dirs
548 Do not delete directories when done. This is useful if you want to
549 inspect the directories used for various commands.
550
551 --procname-prefix ARG
552 --procname-prefix=ARG
553 --no-procname-prefix
554 Add a prefix to all proc names (as seen by ps).
555
556 --summary
557 --summary=/path/to/summary.json
558 --no-summary
559 Write out a summary json file, if no path is provided
560 'summary.json' will be used. The .json extension is added
561 automatically if omitted.
562
563 Logging Options
564
565 --bzip2
566 --bz2
567 --bzip2_log
568 -B
569 --no-bzip2
570 Use bzip2 compression when writing the log. This option implies -L.
571 The .bz2 prefix is added to log file name for you
572
573 --gzip
574 --gz
575 --gzip_log
576 -G
577 --no-gzip
578 Use gzip compression when writing the log. This option implies -L.
579 The .gz prefix is added to log file name for you
580
581 --log
582 -L
583 --no-log
584 Turn on logging
585
586 --log-dir ARG
587 --log-dir=ARG
588 --no-log-dir
589 Specify a log directory. Will fall back to the system temp dir.
590
591 --log-file ARG
592 --log-file=ARG
593 -F ARG
594 -F=ARG
595 --no-log-file
596 Specify the name of the log file. This option implies -L.
597
598 --log-file-format ARG
599 --log-file-format=ARG
600 --lff ARG
601 --lff=ARG
602 --no-log-file-format
603 Specify the format for automatically-generated log files.
604 Overridden by --log-file, if given. This option implies -L
605 (Default: \$YATH_LOG_FILE_FORMAT, if that is set, or else
606 "%!P%Y-%m-%d~%H:%M:%S~%!U~%!p.jsonl"). This is a string in which
607 percent-escape sequences will be replaced as per POSIX::strftime.
608 The following special escape sequences are also replaced: (%!P :
609 Project name followed by a ~, if a project is defined, otherwise
610 empty string) (%!U : the unique test run ID) (%!p : the process ID)
611 (%!S : the number of seconds since local midnight UTC)
612
613 Can also be set with the following environment variables:
614 "YATH_LOG_FILE_FORMAT", "TEST2_HARNESS_LOG_FORMAT"
615
616 Notification Options
617
618 --notify-email foo@example.com
619 --no-notify-email
620 Email the test results to the specified email address(es)
621
622 Can be specified multiple times
623
624 --notify-email-fail foo@example.com
625 --no-notify-email-fail
626 Email failing results to the specified email address(es)
627
628 Can be specified multiple times
629
630 --notify-email-from foo@example.com
631 --no-notify-email-from
632 If any email is sent, this is who it will be from
633
634 --notify-email-owner
635 --no-notify-email-owner
636 Email the owner of broken tests files upon failure. Add `# HARNESS-
637 META-OWNER foo@example.com` to the top of a test file to give it an
638 owner
639
640 --notify-no-batch-email
641 --no-notify-no-batch-email
642 Usually owner failures are sent as a single batch at the end of
643 testing. Toggle this to send failures as they happen.
644
645 --notify-no-batch-slack
646 --no-notify-no-batch-slack
647 Usually owner failures are sent as a single batch at the end of
648 testing. Toggle this to send failures as they happen.
649
650 --notify-slack '#foo'
651 --notify-slack '@bar'
652 --no-notify-slack
653 Send results to a slack channel and/or user
654
655 Can be specified multiple times
656
657 --notify-slack-fail '#foo'
658 --notify-slack-fail '@bar'
659 --no-notify-slack-fail
660 Send failing results to a slack channel and/or user
661
662 Can be specified multiple times
663
664 --notify-slack-owner
665 --no-notify-slack-owner
666 Send slack notifications to the slack channels/users listed in test
667 meta-data when tests fail.
668
669 --notify-slack-url https://hooks.slack.com/...
670 --no-notify-slack-url
671 Specify an API endpoint for slack webhook integrations
672
673 --notify-text ARG
674 --notify-text=ARG
675 --message ARG
676 --message=ARG
677 --msg ARG
678 --msg=ARG
679 --no-notify-text
680 Add a custom text snippet to email/slack notifications
681
682 --notify-text-module ARG
683 --notify-text-module=ARG
684 --message_module ARG
685 --message_module=ARG
686 --no-notify-text-module
687 Use the specified module to generate messages for emails and/or
688 slack.
689
690 Run Options
691
692 --author-testing
693 -A
694 --no-author-testing
695 This will set the AUTHOR_TESTING environment to true
696
697 --dbi-profiling
698 --no-dbi-profiling
699 Use Test2::Plugin::DBIProfile to collect database profiling data
700
701 --env-var VAR=VAL
702 -EVAR=VAL
703 -E VAR=VAL
704 --no-env-var
705 Set environment variables to set when each test is run.
706
707 Can be specified multiple times
708
709 --event-uuids
710 --uuids
711 --no-event-uuids
712 Use Test2::Plugin::UUID inside tests (default: on)
713
714 --fields name:details
715 --fields JSON_STRING
716 -f name:details
717 -f JSON_STRING
718 --no-fields
719 Add custom data to the harness run
720
721 Can be specified multiple times
722
723 --input ARG
724 --input=ARG
725 --no-input
726 Input string to be used as standard input for ALL tests. See also:
727 --input-file
728
729 --input-file ARG
730 --input-file=ARG
731 --no-input-file
732 Use the specified file as standard input to ALL tests
733
734 --io-events
735 --no-io-events
736 Use Test2::Plugin::IOEvents inside tests to turn all prints into
737 test2 events (default: off)
738
739 --link 'https://travis.work/builds/42'
740 --link 'https://jenkins.work/job/42'
741 --link 'https://buildbot.work/builders/foo/builds/42'
742 --no-link
743 Provide one or more links people can follow to see more about this
744 run.
745
746 Can be specified multiple times
747
748 --load ARG
749 --load=ARG
750 --load-module ARG
751 --load-module=ARG
752 -m ARG
753 -m=ARG
754 --no-load
755 Load a module in each test (after fork). The "import" method is not
756 called.
757
758 Can be specified multiple times
759
760 --load-import Module
761 --load-import Module=import_arg1,arg2,...
762 --loadim Module
763 --loadim Module=import_arg1,arg2,...
764 -M Module
765 -M Module=import_arg1,arg2,...
766 --no-load-import
767 Load a module in each test (after fork). Import is called.
768
769 Can be specified multiple times. If the same key is listed multiple
770 times the value lists will be appended together.
771
772 --mem-usage
773 --no-mem-usage
774 Use Test2::Plugin::MemUsage inside tests (default: on)
775
776 --retry ARG
777 --retry=ARG
778 -r ARG
779 -r=ARG
780 --no-retry
781 Run any jobs that failed a second time. NOTE: --retry=1 means
782 failing tests will be attempted twice!
783
784 --retry-isolated
785 --retry-iso
786 --no-retry-isolated
787 If true then any job retries will be done in isolation (as though
788 -j1 was set)
789
790 --run-id
791 --id
792 --no-run-id
793 Set a specific run-id. (Default: a UUID)
794
795 --test-args ARG
796 --test-args=ARG
797 --no-test-args
798 Arguments to pass in as @ARGV for all tests that are run. These can
799 be provided easier using the '::' argument separator.
800
801 Can be specified multiple times
802
803 --stream
804 --no-stream
805 Use the stream formatter (default is on)
806
807 --tap
808 --TAP
809 ----no-stream
810 --no-tap
811 The TAP format is lossy and clunky. Test2::Harness normally uses a
812 newer streaming format to receive test results. There are
813 old/legacy tests where this causes problems, in which case setting
814 --TAP or --no-stream can help.
815
816 Runner Options
817
818 --abort-on-bail
819 --no-abort-on-bail
820 Abort all testing if a bail-out is encountered (default: on)
821
822 --blib
823 -b
824 --no-blib
825 (Default: include if it exists) Include 'blib/lib' and 'blib/arch'
826 in your module path
827
828 --cover
829 --cover=-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
830 --no-cover
831 Use Devel::Cover to calculate test coverage. This disables forking.
832 If no args are specified the following are used:
833 -silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
834
835 --dump-depmap
836 --no-dump-depmap
837 When using staged preload, dump the depmap for each stage as json
838 files
839
840 --event-timeout SECONDS
841 --et SECONDS
842 --no-event-timeout
843 Kill test if no output is received within timeout period. (Default:
844 60 seconds). Add the "# HARNESS-NO-TIMEOUT" comment to the top of a
845 test file to disable timeouts on a per-test basis. This prevents a
846 hung test from running forever.
847
848 --include ARG
849 --include=ARG
850 -I ARG
851 -I=ARG
852 --no-include
853 Add a directory to your include paths
854
855 Can be specified multiple times
856
857 --job-count ARG
858 --job-count=ARG
859 --jobs ARG
860 --jobs=ARG
861 -j ARG
862 -j=ARG
863 --no-job-count
864 Set the number of concurrent jobs to run
865
866 Can also be set with the following environment variables:
867 "YATH_JOB_COUNT", "T2_HARNESS_JOB_COUNT", "HARNESS_JOB_COUNT"
868
869 --lib
870 -l
871 --no-lib
872 (Default: include if it exists) Include 'lib' in your module path
873
874 --nytprof
875 --no-nytprof
876 Use Devel::NYTProf on tests. This will set addpid=1 for you. This
877 works with or without fork.
878
879 --post-exit-timeout SECONDS
880 --pet SECONDS
881 --no-post-exit-timeout
882 Stop waiting post-exit after the timeout period. (Default: 15
883 seconds) Some tests fork and allow the parent to exit before
884 writing all their output. If Test2::Harness detects an incomplete
885 plan after the test exits it will monitor for more events until the
886 timeout period. Add the "# HARNESS-NO-TIMEOUT" comment to the top
887 of a test file to disable timeouts on a per-test basis.
888
889 --preload-threshold ARG
890 --preload-threshold=ARG
891 --Pt ARG
892 --Pt=ARG
893 -W ARG
894 -W=ARG
895 --no-preload-threshold
896 Only do preload if at least N tests are going to be run. In some
897 cases a full preload takes longer than simply running the tests,
898 this lets you specify a minimum number of test jobs that will be
899 run for preload to happen. This has no effect for a persistent
900 runner. The default is 0, and it means always preload.
901
902 --preloads ARG
903 --preloads=ARG
904 --preload ARG
905 --preload=ARG
906 -P ARG
907 -P=ARG
908 --no-preloads
909 Preload a module before running tests
910
911 Can be specified multiple times
912
913 --resource Port
914 --resource +Test2::Harness::Runner::Resource::Port
915 -R Port
916 --no-resource
917 Use a resource module to assign resource assignments to individual
918 tests
919
920 Can be specified multiple times
921
922 --switch ARG
923 --switch=ARG
924 -S ARG
925 -S=ARG
926 --no-switch
927 Pass the specified switch to perl for each test. This is not
928 compatible with preload.
929
930 Can be specified multiple times
931
932 --tlib
933 --no-tlib
934 (Default: off) Include 't/lib' in your module path
935
936 --unsafe-inc
937 --no-unsafe-inc
938 perl is removing '.' from @INC as a security concern. This option
939 keeps things from breaking for now.
940
941 Can also be set with the following environment variables:
942 "PERL_USE_UNSAFE_INC"
943
944 --use-fork
945 --fork
946 --no-use-fork
947 (default: on, except on windows) Normally tests are run by forking,
948 which allows for features like preloading. This will turn off the
949 behavior globally (which is not compatible with preloading). This
950 is slower, it is better to tag misbehaving tests with the '#
951 HARNESS-NO-PRELOAD' comment in their header to disable forking only
952 for those tests.
953
954 Can also be set with the following environment variables:
955 "!T2_NO_FORK", "T2_HARNESS_FORK", "!T2_HARNESS_NO_FORK",
956 "YATH_FORK", "!YATH_NO_FORK"
957
958 --use-timeout
959 --timeout
960 --no-use-timeout
961 (default: on) Enable/disable timeouts
962
963 Workspace Options
964
965 --clear
966 -C
967 --no-clear
968 Clear the work directory if it is not already empty
969
970 --tmp-dir ARG
971 --tmp-dir=ARG
972 --tmpdir ARG
973 --tmpdir=ARG
974 -t ARG
975 -t=ARG
976 --no-tmp-dir
977 Use a specific temp directory (Default: use system temp dir)
978
979 Can also be set with the following environment variables:
980 "T2_HARNESS_TEMP_DIR", "YATH_TEMP_DIR", "TMPDIR", "TEMPDIR",
981 "TMP_DIR", "TEMP_DIR"
982
983 --workdir ARG
984 --workdir=ARG
985 -w ARG
986 -w=ARG
987 --no-workdir
988 Set the work directory (Default: new temp directory)
989
990 Can also be set with the following environment variables:
991 "T2_WORKDIR", "YATH_WORKDIR"
992
993 YathUI Options
994
995 --yathui-api-key ARG
996 --yathui-api-key=ARG
997 --no-yathui-api-key
998 Yath-UI API key. This is not necessary if your Yath-UI instance is
999 set to single-user
1000
1001 --yathui-coverage
1002 --no-yathui-coverage
1003 Poll coverage data from Yath-UI to determine what tests should be
1004 run for changed files
1005
1006 --yathui-db
1007 --no-yathui-db
1008 Add the YathUI DB renderer in addition to other renderers
1009
1010 --yathui-durations
1011 --no-yathui-durations
1012 Poll duration data from Yath-UI to help order tests efficiently
1013
1014 --yathui-grace
1015 --no-yathui-grace
1016 If yath cannot connect to yath-ui it normally throws an error, use
1017 this to make it fail gracefully. You get a warning, but things keep
1018 going.
1019
1020 --yathui-long-duration 10
1021 --no-yathui-long-duration
1022 Minimum duration length (seconds) before a test goes from MEDIUM to
1023 LONG
1024
1025 --yathui-medium-duration 5
1026 --no-yathui-medium-duration
1027 Minimum duration length (seconds) before a test goes from SHORT to
1028 MEDIUM
1029
1030 --yathui-mode summary
1031 --yathui-mode qvf
1032 --yathui-mode qvfd
1033 --yathui-mode complete
1034 --no-yathui-mode
1035 Set the upload mode (default 'qvfd')
1036
1037 --yathui-only
1038 --no-yathui-only
1039 Only use the YathUI renderer
1040
1041 --yathui-only-db
1042 --no-yathui-only-db
1043 Only use the YathUI DB renderer
1044
1045 --yathui-port 8080
1046 --no-yathui-port
1047 Port to use when running a local server
1048
1049 --yathui-port-command get_port.sh
1050 --yathui-port-command get_port.sh --pid $$
1051 --no-yathui-port-command
1052 Use a command to get a port number. "$$" will be replaced with the
1053 PID of the yath process
1054
1055 --yathui-project ARG
1056 --yathui-project=ARG
1057 --no-yathui-project
1058 The Yath-UI project for your test results
1059
1060 --yathui-render
1061 --no-yathui-render
1062 Add the YathUI renderer in addition to other renderers
1063
1064 --yathui-retry
1065 --no-yathui-retry
1066 How many times to try an operation before giving up
1067
1068 Can be specified multiple times
1069
1070 --yathui-schema PostgreSQL
1071 --yathui-schema MySQL
1072 --yathui-schema MySQL56
1073 --no-yathui-schema
1074 What type of DB/schema to use when using a temporary database
1075
1076 --yathui-upload
1077 --no-yathui-upload
1078 Upload the log to Yath-UI
1079
1080 --yathui-url http://my-yath-ui.com/...
1081 --uri http://my-yath-ui.com/...
1082 --no-yathui-url
1083 Yath-UI url
1084
1085 --yathui-user ARG
1086 --yathui-user=ARG
1087 --no-yathui-user
1088 Username to attach to the data sent to the db
1089
1090 --yathui-db-buffering none
1091 --yathui-db-buffering job
1092 --yathui-db-buffering diag
1093 --yathui-db-buffering run
1094 --no-yathui-db-buffering
1095 Type of buffering to use, if "none" then events are written to the
1096 db one at a time, which is SLOW
1097
1098 --yathui-db-config ARG
1099 --yathui-db-config=ARG
1100 --no-yathui-db-config
1101 Module that implements 'MODULE->yath_ui_config(%params)' which
1102 should return a Test2::Harness::UI::Config instance.
1103
1104 --yathui-db-coverage
1105 --no-yathui-db-coverage
1106 Pull coverage data directly from the database (default: off)
1107
1108 --yathui-db-driver Pg
1109 --yathui-db-drivermysql
1110 --yathui-db-driverMariaDB
1111 --no-yathui-db-driver
1112 DBI Driver to use
1113
1114 --yathui-db-dsn ARG
1115 --yathui-db-dsn=ARG
1116 --no-yathui-db-dsn
1117 DSN to use when connecting to the db
1118
1119 --yathui-db-durations
1120 --no-yathui-db-durations
1121 Pull duration data directly from the database (default: off)
1122
1123 --yathui-db-flush-interval 2
1124 --yathui-db-flush-interval 1.5
1125 --no-yathui-db-flush-interval
1126 When buffering DB writes, force a flush when an event is recieved
1127 at least N seconds after the last flush.
1128
1129 --yathui-db-host ARG
1130 --yathui-db-host=ARG
1131 --no-yathui-db-host
1132 hostname to use when connecting to the db
1133
1134 --yathui-db-name ARG
1135 --yathui-db-name=ARG
1136 --no-yathui-db-name
1137 Name of the database to use for yathui
1138
1139 --yathui-db-pass ARG
1140 --yathui-db-pass=ARG
1141 --no-yathui-db-pass
1142 Password to use when connecting to the db
1143
1144 --yathui-db-port ARG
1145 --yathui-db-port=ARG
1146 --no-yathui-db-port
1147 port to use when connecting to the db
1148
1149 --yathui-db-publisher ARG
1150 --yathui-db-publisher=ARG
1151 --no-yathui-db-publisher
1152 When using coverage or duration data, only use data uploaded by
1153 this user
1154
1155 --yathui-db-socket ARG
1156 --yathui-db-socket=ARG
1157 --no-yathui-db-socket
1158 socket to use when connecting to the db
1159
1160 --yathui-db-user ARG
1161 --yathui-db-user=ARG
1162 --no-yathui-db-user
1163 Username to use when connecting to the db
1164
1166 The source code repository for Test2-Harness can be found at
1167 http://github.com/Test-More/Test2-Harness/.
1168
1170 Chad Granum <exodist@cpan.org>
1171
1173 Chad Granum <exodist@cpan.org>
1174
1176 Copyright 2022 Chad Granum <exodist7@gmail.com>.
1177
1178 This program is free software; you can redistribute it and/or modify it
1179 under the same terms as Perl itself.
1180
1181 See http://dev.perl.org/licenses/
1182
1183
1184
1185perl v5.34.1 2022-07-11 App::Yath::Command::test(3)