1App::Yath::Command::iniUts(e3r)Contributed Perl DocumentAaptpi:o:nYath::Command::init(3)
2
3
4
6 App::Yath::Command::init - Create/update test.pl to run tests via
7 Test2::Harness
8
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
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 it 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 Git Options
100
101 --git-change-base master
102 --git-change-base HEAD^
103 --git-change-base df22abe4
104 --no-git-change-base
105 Find files changed by all commits in the current branch from most
106 recent stopping when a commit is found that is also present in the
107 history of the branch/commit specified as the change base.
108
109 Help and Debugging
110
111 --dummy
112 -d
113 --no-dummy
114 Dummy run, do not actually execute anything
115
116 Can also be set with the following environment variables:
117 "T2_HARNESS_DUMMY"
118
119 --help
120 -h
121 --no-help
122 exit after showing help information
123
124 --keep-dirs
125 --keep_dir
126 -k
127 --no-keep-dirs
128 Do not delete directories when done. This is useful if you want to
129 inspect the directories used for various commands.
130
131 YathUI Options
132
133 --yathui-api-key ARG
134 --yathui-api-key=ARG
135 --no-yathui-api-key
136 Yath-UI API key. This is not necessary if your Yath-UI instance is
137 set to single-user
138
139 --yathui-db
140 --no-yathui-db
141 Add the YathUI DB renderer in addition to other renderers
142
143 --yathui-grace
144 --no-yathui-grace
145 If yath cannot connect to yath-ui it normally throws an error, use
146 this to make it fail gracefully. You get a warning, but things keep
147 going.
148
149 --yathui-long-duration 10
150 --no-yathui-long-duration
151 Minimum duration length (seconds) before a test goes from MEDIUM to
152 LONG
153
154 --yathui-medium-duration 5
155 --no-yathui-medium-duration
156 Minimum duration length (seconds) before a test goes from SHORT to
157 MEDIUM
158
159 --yathui-mode summary
160 --yathui-mode qvf
161 --yathui-mode qvfd
162 --yathui-mode complete
163 --no-yathui-mode
164 Set the upload mode (default 'qvfd')
165
166 --yathui-only
167 --no-yathui-only
168 Only use the YathUI renderer
169
170 --yathui-only-db
171 --no-yathui-only-db
172 Only use the YathUI DB renderer
173
174 --yathui-port 8080
175 --no-yathui-port
176 Port to use when running a local server
177
178 --yathui-port-command get_port.sh
179 --yathui-port-command get_port.sh --pid $$
180 --no-yathui-port-command
181 Use a command to get a port number. "$$" will be replaced with the
182 PID of the yath process
183
184 --yathui-project ARG
185 --yathui-project=ARG
186 --no-yathui-project
187 The Yath-UI project for your test results
188
189 --yathui-render
190 --no-yathui-render
191 Add the YathUI renderer in addition to other renderers
192
193 --yathui-retry
194 --no-yathui-retry
195 How many times to try an operation before giving up
196
197 Can be specified multiple times
198
199 --yathui-schema PostgreSQL
200 --yathui-schema MySQL
201 --yathui-schema MySQL56
202 --no-yathui-schema
203 What type of DB/schema to use when using a temporary database
204
205 --yathui-url http://my-yath-ui.com/...
206 --uri http://my-yath-ui.com/...
207 --no-yathui-url
208 Yath-UI url
209
210 --yathui-user ARG
211 --yathui-user=ARG
212 --no-yathui-user
213 Username to attach to the data sent to the db
214
215 --yathui-db-buffering none
216 --yathui-db-buffering job
217 --yathui-db-buffering diag
218 --yathui-db-buffering run
219 --no-yathui-db-buffering
220 Type of buffering to use, if "none" then events are written to the
221 db one at a time, which is SLOW
222
223 --yathui-db-config ARG
224 --yathui-db-config=ARG
225 --no-yathui-db-config
226 Module that implements 'MODULE->yath_ui_config(%params)' which
227 should return a Test2::Harness::UI::Config instance.
228
229 --yathui-db-driver Pg
230 --yathui-db-drivermysql
231 --yathui-db-driverMariaDB
232 --no-yathui-db-driver
233 DBI Driver to use
234
235 --yathui-db-dsn ARG
236 --yathui-db-dsn=ARG
237 --no-yathui-db-dsn
238 DSN to use when connecting to the db
239
240 --yathui-db-flush-interval 2
241 --yathui-db-flush-interval 1.5
242 --no-yathui-db-flush-interval
243 When buffering DB writes, force a flush when an event is recieved
244 at least N seconds after the last flush.
245
246 --yathui-db-host ARG
247 --yathui-db-host=ARG
248 --no-yathui-db-host
249 hostname to use when connecting to the db
250
251 --yathui-db-name ARG
252 --yathui-db-name=ARG
253 --no-yathui-db-name
254 Name of the database to use for yathui
255
256 --yathui-db-pass ARG
257 --yathui-db-pass=ARG
258 --no-yathui-db-pass
259 Password to use when connecting to the db
260
261 --yathui-db-port ARG
262 --yathui-db-port=ARG
263 --no-yathui-db-port
264 port to use when connecting to the db
265
266 --yathui-db-socket ARG
267 --yathui-db-socket=ARG
268 --no-yathui-db-socket
269 socket to use when connecting to the db
270
271 --yathui-db-user ARG
272 --yathui-db-user=ARG
273 --no-yathui-db-user
274 Username to use when connecting to the db
275
277 The source code repository for Test2-Harness can be found at
278 http://github.com/Test-More/Test2-Harness/.
279
281 Chad Granum <exodist@cpan.org>
282
284 Chad Granum <exodist@cpan.org>
285
287 Copyright 2021 Chad Granum <exodist7@gmail.com>.
288
289 This program is free software; you can redistribute it and/or modify it
290 under the same terms as Perl itself.
291
292 See http://dev.perl.org/licenses/
293
294
295
296perl v5.32.1 2021-03-12 App::Yath::Command::init(3)