1App::Yath::Command::runU(s3e)r Contributed Perl DocumentaAtpipo:n:Yath::Command::run(3)
2
3
4

NAME

6       App::Yath::Command::persist
7

DESCRIPTION

SYNOPSIS

COMMAND LINE USAGE

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

SOURCE

425       The source code repository for Test2-Harness can be found at
426       http://github.com/Test-More/Test2-Harness/.
427

MAINTAINERS

429       Chad Granum <exodist@cpan.org>
430

AUTHORS

432       Chad Granum <exodist@cpan.org>
433
435       Copyright 2019 Chad Granum <exodist7@gmail.com>.
436
437       This program is free software; you can redistribute it and/or modify it
438       under the same terms as Perl itself.
439
440       See http://dev.perl.org/licenses/
441
442
443
444perl v5.30.1                      2020-01-30        App::Yath::Command::run(3)
Impressum