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

NAME

6       App::Yath::Command::init - Create/update test.pl to run tests via
7       Test2::Harness
8

DESCRIPTION

10       This command will create or update the 'test.pl' file in the current
11       directory.  This 'test.pl' file this creates will run all your tests
12       via yath.
13
14       This command will fail if there is already a test.pl file that does not
15       look like it was generated by this command.
16

USAGE

18           $ yath [YATH OPTIONS] init [COMMAND OPTIONS]
19
20   YATH OPTIONS
21       Developer
22
23       --dev-lib
24       --dev-lib=lib
25       -D
26       -D=lib
27       -Dlib
28       --no-dev-lib
29           Add paths to @INC before loading ANYTHING. This is what you use if
30           you are developing yath or yath plugins to make sure the yath
31           script finds the local code instead of the installed versions of
32           the same code. You can provide an argument (-Dfoo) to provide a
33           custom path, or you can just use -D without and arg to add lib,
34           blib/lib and blib/arch.
35
36           Can be specified multiple times
37
38       Environment
39
40       --persist-dir ARG
41       --persist-dir=ARG
42       --no-persist-dir
43           Where to find persistence files.
44
45       --persist-file ARG
46       --persist-file=ARG
47       --pfile ARG
48       --pfile=ARG
49       --no-persist-file
50           Where to find the persistence file. The default is
51           /{system-tempdir}/project-yath-persist.json. If no project is
52           specified then it will fall back to the current directory. If the
53           current directory is not writable it will default to
54           /tmp/yath-persist.json which limits you to one persistent runner on
55           your system.
56
57       --project ARG
58       --project=ARG
59       --project-name ARG
60       --project-name=ARG
61       --no-project
62           This lets you provide a label for your current project/codebase.
63           This is best used in a .yath.rc file. This is necessary for a
64           persistent runner.
65
66       Help and Debugging
67
68       --show-opts
69       --no-show-opts
70           Exit after showing what yath thinks your options mean
71
72       --version
73       -V
74       --no-version
75           Exit after showing a helpful usage message
76
77       Plugins
78
79       --no-scan-plugins
80       --no-no-scan-plugins
81           Normally yath scans for and loads all App::Yath::Plugin::* modules
82           in order to bring in command-line options they may provide. This
83           flag will disable that. This is useful if you have a naughty plugin
84           that is loading other modules when it should not.
85
86       --plugins PLUGIN
87       --plugins +App::Yath::Plugin::PLUGIN
88       --plugins PLUGIN=arg1,arg2,...
89       --plugin PLUGIN
90       --plugin +App::Yath::Plugin::PLUGIN
91       --plugin PLUGIN=arg1,arg2,...
92       -pPLUGIN
93       --no-plugins
94           Load a yath plugin.
95
96           Can be specified multiple times
97
98   COMMAND OPTIONS
99       Cover Options
100
101       --cover-aggregator ByTest
102       --cover-aggregator ByRun
103       --cover-aggregator +Custom::Aggregator
104       --cover-agg ByTest
105       --cover-agg ByRun
106       --cover-agg +Custom::Aggregator
107       --no-cover-aggregator
108           Choose a custom aggregator subclass
109
110       --cover-class ARG
111       --cover-class=ARG
112       --no-cover-class
113           Choose a Test2::Plugin::Cover subclass
114
115       --cover-dirs ARG
116       --cover-dirs=ARG
117       --cover-dir ARG
118       --cover-dir=ARG
119       --no-cover-dirs
120           NO DESCRIPTION - FIX ME
121
122           Can be specified multiple times
123
124       --cover-exclude-private
125       --no-cover-exclude-private
126       --cover-files
127       --no-cover-files
128           Use Test2::Plugin::Cover to collect coverage data for what files
129           are touched by what tests. Unlike Devel::Cover this has very little
130           performance impact (About 4% difference)
131
132       --cover-from path/to/log.jsonl
133       --cover-from http://example.com/coverage
134       --cover-from path/to/coverage.jsonl
135       --no-cover-from
136           This can be a test log, a coverage dump (old style json or new
137           jsonl format), or a url to any of the previous. Tests will not be
138           run if the file/url is invalid.
139
140       --cover-from-type json
141       --cover-from-type jsonl
142       --cover-from-type log
143       --no-cover-from-type
144           File type for coverage source. Usually it can be detected, but when
145           it cannot be you should specify. "json" is old style single-blob
146           coverage data, "jsonl" is the new by-test style, "log" is a logfile
147           from a previous run.
148
149       --cover-manager My::Coverage::Manager
150       --no-cover-manager
151           Coverage 'from' manager to use when coverage data does not provide
152           one
153
154       --cover-maybe-from path/to/log.jsonl
155       --cover-maybe-from http://example.com/coverage
156       --cover-maybe-from path/to/coverage.jsonl
157       --no-cover-maybe-from
158           This can be a test log, a coverage dump (old style json or new
159           jsonl format), or a url to any of the previous. Tests will coninue
160           if even if the coverage file/url is invalid.
161
162       --cover-maybe-from-type json
163       --cover-maybe-from-type jsonl
164       --cover-maybe-from-type log
165       --no-cover-maybe-from-type
166           Same as "from_type" but for "maybe_from". Defaults to "from_type"
167           if that is specified, otherwise auto-detect
168
169       --cover-metrics
170       --no-cover-metrics
171       --cover-types ARG
172       --cover-types=ARG
173       --cover-type ARG
174       --cover-type=ARG
175       --no-cover-types
176           NO DESCRIPTION - FIX ME
177
178           Can be specified multiple times
179
180       --cover-write
181       --cover-write=coverage.jsonl
182       --cover-write=coverage.json
183       --no-cover-write
184           Create a json or jsonl file of all coverage data seen during the
185           run (This implies --cover-files).
186
187       Git Options
188
189       --git-change-base master
190       --git-change-base HEAD^
191       --git-change-base df22abe4
192       --no-git-change-base
193           Find files changed by all commits in the current branch from most
194           recent stopping when a commit is found that is also present in the
195           history of the branch/commit specified as the change base.
196
197       Help and Debugging
198
199       --dummy
200       -d
201       --no-dummy
202           Dummy run, do not actually execute anything
203
204           Can also be set with the following environment variables:
205           "T2_HARNESS_DUMMY"
206
207       --help
208       -h
209       --no-help
210           exit after showing help information
211
212       --interactive
213       -i
214       --no-interactive
215           Use interactive mode, 1 test at a time, stdin forwarded to it
216
217       --keep-dirs
218       --keep_dir
219       -k
220       --no-keep-dirs
221           Do not delete directories when done. This is useful if you want to
222           inspect the directories used for various commands.
223
224       --procname-prefix ARG
225       --procname-prefix=ARG
226       --no-procname-prefix
227           Add a prefix to all proc names (as seen by ps).
228
229       YathUI Options
230
231       --yathui-api-key ARG
232       --yathui-api-key=ARG
233       --no-yathui-api-key
234           Yath-UI API key. This is not necessary if your Yath-UI instance is
235           set to single-user
236
237       --yathui-db
238       --no-yathui-db
239           Add the YathUI DB renderer in addition to other renderers
240
241       --yathui-grace
242       --no-yathui-grace
243           If yath cannot connect to yath-ui it normally throws an error, use
244           this to make it fail gracefully. You get a warning, but things keep
245           going.
246
247       --yathui-long-duration 10
248       --no-yathui-long-duration
249           Minimum duration length (seconds) before a test goes from MEDIUM to
250           LONG
251
252       --yathui-medium-duration 5
253       --no-yathui-medium-duration
254           Minimum duration length (seconds) before a test goes from SHORT to
255           MEDIUM
256
257       --yathui-mode summary
258       --yathui-mode qvf
259       --yathui-mode qvfd
260       --yathui-mode complete
261       --no-yathui-mode
262           Set the upload mode (default 'qvfd')
263
264       --yathui-only
265       --no-yathui-only
266           Only use the YathUI renderer
267
268       --yathui-only-db
269       --no-yathui-only-db
270           Only use the YathUI DB renderer
271
272       --yathui-port 8080
273       --no-yathui-port
274           Port to use when running a local server
275
276       --yathui-port-command get_port.sh
277       --yathui-port-command get_port.sh --pid $$
278       --no-yathui-port-command
279           Use a command to get a port number. "$$" will be replaced with the
280           PID of the yath process
281
282       --yathui-project ARG
283       --yathui-project=ARG
284       --no-yathui-project
285           The Yath-UI project for your test results
286
287       --yathui-render
288       --no-yathui-render
289           Add the YathUI renderer in addition to other renderers
290
291       --yathui-resources
292       --yathui-resources=5
293       --no-yathui-resources
294           Send resource info (for supported resources) to yathui at the
295           specified interval in seconds (5 if not specified)
296
297       --yathui-retry
298       --no-yathui-retry
299           How many times to try an operation before giving up
300
301           Can be specified multiple times
302
303       --yathui-schema PostgreSQL
304       --yathui-schema MySQL
305       --yathui-schema MySQL56
306       --no-yathui-schema
307           What type of DB/schema to use when using a temporary database
308
309       --yathui-url http://my-yath-ui.com/...
310       --uri http://my-yath-ui.com/...
311       --no-yathui-url
312           Yath-UI url
313
314       --yathui-user ARG
315       --yathui-user=ARG
316       --no-yathui-user
317           Username to attach to the data sent to the db
318
319       --yathui-db-buffering none
320       --yathui-db-buffering job
321       --yathui-db-buffering diag
322       --yathui-db-buffering run
323       --no-yathui-db-buffering
324           Type of buffering to use, if "none" then events are written to the
325           db one at a time, which is SLOW
326
327       --yathui-db-config ARG
328       --yathui-db-config=ARG
329       --no-yathui-db-config
330           Module that implements 'MODULE->yath_ui_config(%params)' which
331           should return a Test2::Harness::UI::Config instance.
332
333       --yathui-db-coverage
334       --no-yathui-db-coverage
335           Pull coverage data directly from the database (default: off)
336
337       --yathui-db-driver Pg
338       --yathui-db-drivermysql
339       --yathui-db-driverMariaDB
340       --no-yathui-db-driver
341           DBI Driver to use
342
343       --yathui-db-dsn ARG
344       --yathui-db-dsn=ARG
345       --no-yathui-db-dsn
346           DSN to use when connecting to the db
347
348       --yathui-db-duration-limit ARG
349       --yathui-db-duration-limit=ARG
350       --no-yathui-db-duration-limit
351           Limit the number of runs to look at for durations data (default:
352           10)
353
354       --yathui-db-durations
355       --no-yathui-db-durations
356           Pull duration data directly from the database (default: off)
357
358       --yathui-db-flush-interval 2
359       --yathui-db-flush-interval 1.5
360       --no-yathui-db-flush-interval
361           When buffering DB writes, force a flush when an event is recieved
362           at least N seconds after the last flush.
363
364       --yathui-db-host ARG
365       --yathui-db-host=ARG
366       --no-yathui-db-host
367           hostname to use when connecting to the db
368
369       --yathui-db-name ARG
370       --yathui-db-name=ARG
371       --no-yathui-db-name
372           Name of the database to use for yathui
373
374       --yathui-db-pass ARG
375       --yathui-db-pass=ARG
376       --no-yathui-db-pass
377           Password to use when connecting to the db
378
379       --yathui-db-port ARG
380       --yathui-db-port=ARG
381       --no-yathui-db-port
382           port to use when connecting to the db
383
384       --yathui-db-publisher ARG
385       --yathui-db-publisher=ARG
386       --no-yathui-db-publisher
387           When using coverage or duration data, only use data uploaded by
388           this user
389
390       --yathui-db-socket ARG
391       --yathui-db-socket=ARG
392       --no-yathui-db-socket
393           socket to use when connecting to the db
394
395       --yathui-db-user ARG
396       --yathui-db-user=ARG
397       --no-yathui-db-user
398           Username to use when connecting to the db
399

SOURCE

401       The source code repository for Test2-Harness can be found at
402       http://github.com/Test-More/Test2-Harness/.
403

MAINTAINERS

405       Chad Granum <exodist@cpan.org>
406

AUTHORS

408       Chad Granum <exodist@cpan.org>
409
411       Copyright 2023 Chad Granum <exodist7@gmail.com>.
412
413       This program is free software; you can redistribute it and/or modify it
414       under the same terms as Perl itself.
415
416       See http://dev.perl.org/licenses/
417
418
419
420perl v5.36.1                      2023-10-04       App::Yath::Command::init(3)
Impressum