1App::Yath::Command::staUrste(r3)Contributed Perl DocumenAtpapt:i:oYnath::Command::start(3)
2
3
4
6 App::Yath::Command::start - Start the persistent test runner
7
9 This command is used to start a persistant instance of yath. A
10 persistant instance is useful because it allows you to preload modules
11 in advance, reducing start time for any tests you decide to run as you
12 work.
13
14 A running instance will watch for changes to any preloaded files, and
15 restart itself if anything changes. Changed files are blacklisted for
16 subsequent reloads so that reloading is not a frequent occurence when
17 editing the same file over and over again.
18
20 $ yath [YATH OPTIONS] start [COMMAND OPTIONS]
21
22 YATH OPTIONS
23 Developer
24
25 --dev-lib
26 --dev-lib=lib
27 -D
28 -D=lib
29 -Dlib
30 --no-dev-lib
31 Add paths to @INC before loading ANYTHING. This is what you use if
32 you are developing yath or yath plugins to make sure the yath
33 script finds the local code instead of the installed versions of
34 the same code. You can provide an argument (-Dfoo) to provide a
35 custom path, or you can just use -D without and arg to add lib,
36 blib/lib and blib/arch.
37
38 Can be specified multiple times
39
40 Environment
41
42 --persist-dir ARG
43 --persist-dir=ARG
44 --no-persist-dir
45 Where to find persistence files.
46
47 --persist-file ARG
48 --persist-file=ARG
49 --pfile ARG
50 --pfile=ARG
51 --no-persist-file
52 Where to find the persistence file. The default is
53 /{system-tempdir}/project-yath-persist.json. If no project is
54 specified then it will fall back to the current directory. If the
55 current directory is not writable it will default to
56 /tmp/yath-persist.json which limits you to one persistent runner on
57 your system.
58
59 --project ARG
60 --project=ARG
61 --project-name ARG
62 --project-name=ARG
63 --no-project
64 This lets you provide a label for your current project/codebase.
65 This is best used in a .yath.rc file. This is necessary for a
66 persistent runner.
67
68 Help and Debugging
69
70 --show-opts
71 --no-show-opts
72 Exit after showing what yath thinks your options mean
73
74 --version
75 -V
76 --no-version
77 Exit after showing a helpful usage message
78
79 Plugins
80
81 --no-scan-plugins
82 --no-no-scan-plugins
83 Normally yath scans for and loads all App::Yath::Plugin::* modules
84 in order to bring in command-line options they may provide. This
85 flag will disable that. This is useful if you have a naughty plugin
86 that it loading other modules when it should not.
87
88 --plugins PLUGIN
89 --plugins +App::Yath::Plugin::PLUGIN
90 --plugins PLUGIN=arg1,arg2,...
91 --plugin PLUGIN
92 --plugin +App::Yath::Plugin::PLUGIN
93 --plugin PLUGIN=arg1,arg2,...
94 -pPLUGIN
95 --no-plugins
96 Load a yath plugin.
97
98 Can be specified multiple times
99
100 COMMAND OPTIONS
101 Git Options
102
103 --git-change-base master
104 --git-change-base HEAD^
105 --git-change-base df22abe4
106 --no-git-change-base
107 Find files changed by all commits in the current branch from most
108 recent stopping when a commit is found that is also present in the
109 history of the branch/commit specified as the change base.
110
111 Help and Debugging
112
113 --dummy
114 -d
115 --no-dummy
116 Dummy run, do not actually execute anything
117
118 Can also be set with the following environment variables:
119 "T2_HARNESS_DUMMY"
120
121 --help
122 -h
123 --no-help
124 exit after showing help information
125
126 --keep-dirs
127 --keep_dir
128 -k
129 --no-keep-dirs
130 Do not delete directories when done. This is useful if you want to
131 inspect the directories used for various commands.
132
133 Persistent Runner Options
134
135 --quiet
136 -q
137 --no-quiet
138 Be very quiet.
139
140 Can be specified multiple times
141
142 Runner Options
143
144 --blib
145 -b
146 --no-blib
147 (Default: include if it exists) Include 'blib/lib' and 'blib/arch'
148 in your module path
149
150 --cover
151 --cover=-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
152 --no-cover
153 Use Devel::Cover to calculate test coverage. This disables forking.
154 If no args are specified the following are used:
155 -silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
156
157 --daemon
158 --no-daemon
159 Start the runner as a daemon (Default: True)
160
161 --event-timeout SECONDS
162 --et SECONDS
163 --no-event-timeout
164 Kill test if no output is received within timeout period. (Default:
165 60 seconds). Add the "# HARNESS-NO-TIMEOUT" comment to the top of a
166 test file to disable timeouts on a per-test basis. This prevents a
167 hung test from running forever.
168
169 --include ARG
170 --include=ARG
171 -I ARG
172 -I=ARG
173 --no-include
174 Add a directory to your include paths
175
176 Can be specified multiple times
177
178 --job-count ARG
179 --job-count=ARG
180 --jobs ARG
181 --jobs=ARG
182 -j ARG
183 -j=ARG
184 --no-job-count
185 Set the number of concurrent jobs to run (Default: 1)
186
187 Can also be set with the following environment variables:
188 "YATH_JOB_COUNT", "T2_HARNESS_JOB_COUNT", "HARNESS_JOB_COUNT"
189
190 --lib
191 -l
192 --no-lib
193 (Default: include if it exists) Include 'lib' in your module path
194
195 --nytprof
196 --no-nytprof
197 Use Devel::NYTProf on tests. This will set addpid=1 for you. This
198 works with or without fork.
199
200 --post-exit-timeout SECONDS
201 --pet SECONDS
202 --no-post-exit-timeout
203 Stop waiting post-exit after the timeout period. (Default: 15
204 seconds) Some tests fork and allow the parent to exit before
205 writing all their output. If Test2::Harness detects an incomplete
206 plan after the test exits it will monitor for more events until the
207 timeout period. Add the "# HARNESS-NO-TIMEOUT" comment to the top
208 of a test file to disable timeouts on a per-test basis.
209
210 --preload-threshold ARG
211 --preload-threshold=ARG
212 --Pt ARG
213 --Pt=ARG
214 -W ARG
215 -W=ARG
216 --no-preload-threshold
217 Only do preload if at least N tests are going to be run. In some
218 cases a full preload takes longer than simply running the tests,
219 this lets you specify a minimum number of test jobs that will be
220 run for preload to happen. This has no effect for a persistent
221 runner. The default is 0, and it means always preload.
222
223 --preloads ARG
224 --preloads=ARG
225 --preload ARG
226 --preload=ARG
227 -P ARG
228 -P=ARG
229 --no-preloads
230 Preload a module before running tests
231
232 Can be specified multiple times
233
234 --resource Port
235 --resource +Test2::Harness::Runner::Resource::Port
236 -R Port
237 --no-resource
238 Use a resource module to assign resource assignments to individual
239 tests
240
241 Can be specified multiple times
242
243 --switch ARG
244 --switch=ARG
245 -S ARG
246 -S=ARG
247 --no-switch
248 Pass the specified switch to perl for each test. This is not
249 compatible with preload.
250
251 Can be specified multiple times
252
253 --tlib
254 --no-tlib
255 (Default: off) Include 't/lib' in your module path
256
257 --unsafe-inc
258 --no-unsafe-inc
259 perl is removing '.' from @INC as a security concern. This option
260 keeps things from breaking for now.
261
262 Can also be set with the following environment variables:
263 "PERL_USE_UNSAFE_INC"
264
265 --use-fork
266 --fork
267 --no-use-fork
268 (default: on, except on windows) Normally tests are run by forking,
269 which allows for features like preloading. This will turn off the
270 behavior globally (which is not compatible with preloading). This
271 is slower, it is better to tag misbehaving tests with the '#
272 HARNESS-NO-PRELOAD' comment in their header to disable forking only
273 for those tests.
274
275 Can also be set with the following environment variables:
276 "!T2_NO_FORK", "T2_HARNESS_FORK", "!T2_HARNESS_NO_FORK",
277 "YATH_FORK", "!YATH_NO_FORK"
278
279 --use-timeout
280 --timeout
281 --no-use-timeout
282 (default: on) Enable/disable timeouts
283
284 Workspace Options
285
286 --clear
287 -C
288 --no-clear
289 Clear the work directory if it is not already empty
290
291 --tmp-dir ARG
292 --tmp-dir=ARG
293 --tmpdir ARG
294 --tmpdir=ARG
295 -t ARG
296 -t=ARG
297 --no-tmp-dir
298 Use a specific temp directory (Default: use system temp dir)
299
300 Can also be set with the following environment variables:
301 "T2_HARNESS_TEMP_DIR", "YATH_TEMP_DIR", "TMPDIR", "TEMPDIR",
302 "TMP_DIR", "TEMP_DIR"
303
304 --workdir ARG
305 --workdir=ARG
306 -w ARG
307 -w=ARG
308 --no-workdir
309 Set the work directory (Default: new temp directory)
310
311 Can also be set with the following environment variables:
312 "T2_WORKDIR", "YATH_WORKDIR"
313
314 YathUI Options
315
316 --yathui-api-key ARG
317 --yathui-api-key=ARG
318 --no-yathui-api-key
319 Yath-UI API key. This is not necessary if your Yath-UI instance is
320 set to single-user
321
322 --yathui-db
323 --no-yathui-db
324 Add the YathUI DB renderer in addition to other renderers
325
326 --yathui-grace
327 --no-yathui-grace
328 If yath cannot connect to yath-ui it normally throws an error, use
329 this to make it fail gracefully. You get a warning, but things keep
330 going.
331
332 --yathui-long-duration 10
333 --no-yathui-long-duration
334 Minimum duration length (seconds) before a test goes from MEDIUM to
335 LONG
336
337 --yathui-medium-duration 5
338 --no-yathui-medium-duration
339 Minimum duration length (seconds) before a test goes from SHORT to
340 MEDIUM
341
342 --yathui-mode summary
343 --yathui-mode qvf
344 --yathui-mode qvfd
345 --yathui-mode complete
346 --no-yathui-mode
347 Set the upload mode (default 'qvfd')
348
349 --yathui-only
350 --no-yathui-only
351 Only use the YathUI renderer
352
353 --yathui-only-db
354 --no-yathui-only-db
355 Only use the YathUI DB renderer
356
357 --yathui-port 8080
358 --no-yathui-port
359 Port to use when running a local server
360
361 --yathui-port-command get_port.sh
362 --yathui-port-command get_port.sh --pid $$
363 --no-yathui-port-command
364 Use a command to get a port number. "$$" will be replaced with the
365 PID of the yath process
366
367 --yathui-project ARG
368 --yathui-project=ARG
369 --no-yathui-project
370 The Yath-UI project for your test results
371
372 --yathui-render
373 --no-yathui-render
374 Add the YathUI renderer in addition to other renderers
375
376 --yathui-retry
377 --no-yathui-retry
378 How many times to try an operation before giving up
379
380 Can be specified multiple times
381
382 --yathui-schema PostgreSQL
383 --yathui-schema MySQL
384 --yathui-schema MySQL56
385 --no-yathui-schema
386 What type of DB/schema to use when using a temporary database
387
388 --yathui-url http://my-yath-ui.com/...
389 --uri http://my-yath-ui.com/...
390 --no-yathui-url
391 Yath-UI url
392
393 --yathui-user ARG
394 --yathui-user=ARG
395 --no-yathui-user
396 Username to attach to the data sent to the db
397
398 --yathui-db-buffering none
399 --yathui-db-buffering job
400 --yathui-db-buffering diag
401 --yathui-db-buffering run
402 --no-yathui-db-buffering
403 Type of buffering to use, if "none" then events are written to the
404 db one at a time, which is SLOW
405
406 --yathui-db-config ARG
407 --yathui-db-config=ARG
408 --no-yathui-db-config
409 Module that implements 'MODULE->yath_ui_config(%params)' which
410 should return a Test2::Harness::UI::Config instance.
411
412 --yathui-db-driver Pg
413 --yathui-db-drivermysql
414 --yathui-db-driverMariaDB
415 --no-yathui-db-driver
416 DBI Driver to use
417
418 --yathui-db-dsn ARG
419 --yathui-db-dsn=ARG
420 --no-yathui-db-dsn
421 DSN to use when connecting to the db
422
423 --yathui-db-flush-interval 2
424 --yathui-db-flush-interval 1.5
425 --no-yathui-db-flush-interval
426 When buffering DB writes, force a flush when an event is recieved
427 at least N seconds after the last flush.
428
429 --yathui-db-host ARG
430 --yathui-db-host=ARG
431 --no-yathui-db-host
432 hostname to use when connecting to the db
433
434 --yathui-db-name ARG
435 --yathui-db-name=ARG
436 --no-yathui-db-name
437 Name of the database to use for yathui
438
439 --yathui-db-pass ARG
440 --yathui-db-pass=ARG
441 --no-yathui-db-pass
442 Password to use when connecting to the db
443
444 --yathui-db-port ARG
445 --yathui-db-port=ARG
446 --no-yathui-db-port
447 port to use when connecting to the db
448
449 --yathui-db-socket ARG
450 --yathui-db-socket=ARG
451 --no-yathui-db-socket
452 socket to use when connecting to the db
453
454 --yathui-db-user ARG
455 --yathui-db-user=ARG
456 --no-yathui-db-user
457 Username to use when connecting to the db
458
460 The source code repository for Test2-Harness can be found at
461 http://github.com/Test-More/Test2-Harness/.
462
464 Chad Granum <exodist@cpan.org>
465
467 Chad Granum <exodist@cpan.org>
468
470 Copyright 2021 Chad Granum <exodist7@gmail.com>.
471
472 This program is free software; you can redistribute it and/or modify it
473 under the same terms as Perl itself.
474
475 See http://dev.perl.org/licenses/
476
477
478
479perl v5.32.1 2021-03-12 App::Yath::Command::start(3)