1BEAKER-WIZARD(1)                    Beaker                    BEAKER-WIZARD(1)
2
3
4

NAME

6       beaker-wizard - Tool to ease the creation of a new Beaker task
7

SYNOPSIS

9       beaker-wizard [options] <testname> <bug>
10
11
12       The testname argument should be specified as:
13
14          [[[NAMESPACE/]PACKAGE/]TYPE/][PATH/]NAME
15
16       which can be shortened as you need:
17
18          TESTNAME
19          TYPE/TESTNAME
20          TYPE/PATH/TESTNAME
21          PACKAGE/TYPE/NAME
22          PACKAGE/TYPE/PATH/NAME
23          NAMESPACE/PACKAGE/TYPE/NAME
24          NAMESPACE/PACKAGE/TYPE/PATH/NAME
25       beaker-wizard Makefile
26
27
28       This  form  will  run the Wizard in the Makefile edit mode which allows
29       you to quickly and simply update metadata of an already  existing  test
30       while trying to keep the rest of the Makefile untouched.
31

DESCRIPTION

33       Beaker Wizard is a tool which can transform that "create all the neces‐
34       sary files with correct names, values, and paths" boring phase of every
35       test  creation  into  one-line  joy.  For power users there is a lot of
36       inspiration in the man page. For quick start just cd to your test pack‐
37       age directory and simply run beaker-wizard.
38
39       The  beaker-wizard was designed to be flexible: it is intended not only
40       for beginning Beaker users who will welcome questions  with  hints  but
41       also  for  experienced  test  writers who can make use of the extensive
42       command-line options to push their  new-test-creating  productivity  to
43       the limits.
44
45       For  basic  usage help, see Options below or run beaker-wizard -h.  For
46       advanced features and expert usage examples, read on.
47
48   Highlights
49       · provide reasonable defaults wherever possible
50
51       · flexible confirmation (--every, --common, --yes)
52
53       · predefined skeletons (beaker, beakerlib, simple, multihost,  library,
54         parametrized, empty)
55
56       · saved user preferences (defaults, user skeletons, licenses)
57
58       · Bugzilla  integration  (fetch  bug  info,  reproducers, suggest name,
59         description)
60
61       · Makefile  edit  mode  (quick  adding  of  bugs,  limiting  archs   or
62         releases...)
63
64       · automated adding created files to the git repository
65
66   Skeletons
67       Another  interesting  feature  is  that you can save your own skeletons
68       into the preferences file, so that you can automatically  populate  the
69       new test scripts with your favourite structure.
70
71       All of the test related metadata gathered by the Wizard can be expanded
72       inside the skeletons using XML tags. For example:  use  <package/>  for
73       expanding into the test package name or <test/> for the full test name.
74
75       The following metadata variables are available:
76
77       · test namespace package type path testname description
78
79       · bugs reproducers requires architectures releases version time
80
81       · priority license confidential destructive
82
83       · skeleton author email
84

OPTIONS

86       -h, --help
87              show this help message and exit
88
89       -V, --version
90              display version info and quit
91
92       Basic metadata:
93
94              -d DESCRIPTION
95                     short description
96
97              -a ARCHS
98                     architectures [All]
99
100              -r RELEASES
101                     releases [All]
102
103              -o PACKAGES
104                     run for packages [wizard]
105
106              -q PACKAGES
107                     required packages [wizard]
108
109              -t TIME
110                     test time [5m]
111
112       Extra metadata:
113
114              -z VERSION
115                     test version [1.0]
116
117              -p PRIORITY
118                     priority [Normal]
119
120              -l LICENSE
121                     license [GPLv2+]
122
123              -i INTERNAL
124                     confidential [No]
125
126              -u UGLY
127                     destructive [No]
128
129       Author info:
130
131              -n NAME
132                     your name [Petr Splichal]
133
134              -m MAIL
135                     your  email  address  [psplicha@redhat.com <psplicha@red‐
136                     hat.com>]
137
138       Test creation specifics:
139
140              -s SKELETON
141                     skeleton to use [beakerlib]
142
143              -j PREFIX
144                     join the bug prefix to the testname [Yes]
145
146              -f, --force
147                     force without review and overwrite existing files
148
149              -w, --write
150                     write preferences to ~/.beaker_client/wizard
151
152              -b, --bugzilla
153                     contact bugzilla to get bug details
154
155              -g, --git
156                     add created files to the git repository
157
158       Confirmation and verbosity:
159
160              -v, --verbose
161                     display detailed info about every action
162
163              -e, --every
164                     prompt for each and every available option
165
166              -c, --common
167                     confirm only commonly used options [Default]
168
169              -y, --yes
170                     yes, I'm sure, no questions, just do it!
171

EXAMPLES

173       Some brief examples:
174
175          beaker-wizard overload-performance 379791
176              regression test with specified bug and name
177              -> /CoreOS/perl/Regression/bz379791-overload-performance
178
179          beaker-wizard buffer-overflow 2008-1071 -a i386
180              security test with specified CVE and name, i386 arch only
181              -> /CoreOS/perl/Security/CVE-2008-1071-buffer-overflow
182
183          beaker-wizard Sanity/options -y -a?
184              sanity test with given name, ask just for architecture
185              -> /CoreOS/perl/Sanity/options
186
187          beaker-wizard Sanity/server/smoke
188              add an optional path under test type directory
189              -> /CoreOS/perl/Sanity/server/smoke
190
191          beaker-wizard -by 1234
192              contact bugzilla for details, no questions, just review
193              -> /CoreOS/installer/Regression/bz1234-Swap-partition-Installer
194
195          beaker-wizard -byf 2007-0455
196              security test, no questions, no review, overwrite existing files
197              -> /CoreOS/gd/Security/CVE-2007-0455-gd-buffer-overrun
198
199       All of the previous examples assume you're in the package tests  direc‐
200       tory  (e.g. cd git/tests/perl). All the necessary directories and files
201       are created under this location.
202
203   Bugzilla integration
204       The following example  creates  a  regression  test  for  bug  #227655.
205       Option  -b  is  used  to  contact  Bugzilla  to automatically fetch bug
206       details and -y to skip unnecessary questions.
207
208          # beaker-wizard -by 227655
209          Contacting bugzilla...
210          Fetching details for bz227655
211          Examining attachments for possible reproducers
212          Adding test.pl (simple test using Net::Config)
213          Adding libnet.cfg (libnet.cfg test config file)
214
215          Ready to create the test, please review
216          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
217
218          /CoreOS/perl/Regression/bz227655-libnet-cfg-in-wrong-directory
219
220                       Namespace : CoreOS
221                         Package : perl
222                       Test type : Regression
223                   Relative path : None
224                       Test name : bz227655-libnet-cfg-in-wrong-directory
225                     Description : Test for bz227655 (libnet.cfg in wrong directory)
226
227              Bug or CVE numbers : bz227655
228            Reproducers to fetch : test.pl, libnet.cfg
229               Required packages : None
230                   Architectures : All
231                        Releases : All
232                         Version : 1.0
233                            Time : 5m
234
235                        Priority : Normal
236                         License : GPLv2+
237                    Confidential : No
238                     Destructive : No
239
240                        Skeleton : beakerlib
241                          Author : Petr Splichal
242                           Email : psplicha@redhat.com
243
244          [Everything OK?]
245          Directory Regression/bz227655-libnet-cfg-in-wrong-directory created
246          File Regression/bz227655-libnet-cfg-in-wrong-directory/PURPOSE written
247          File Regression/bz227655-libnet-cfg-in-wrong-directory/runtest.sh written
248          File Regression/bz227655-libnet-cfg-in-wrong-directory/Makefile written
249          Attachment test.pl downloaded
250          Attachment libnet.cfg downloaded
251
252   Command line
253       The extensive command line syntax can come in handy  for  example  when
254       creating  a  bunch of sanity tests for a component. Let's create a test
255       skeleton for each of wget's feature areas:
256
257          # cd git/tests/wget
258          # for test in download recursion rules authentication; do
259          >   beaker-wizard -yf $test -t 10m -q httpd,vsftpd \
260          >       -d "Sanity test for $test options"
261          > done
262
263          ...
264
265          /CoreOS/wget/Sanity/authentication
266
267                       Namespace : CoreOS
268                         Package : wget
269                       Test type : Sanity
270                   Relative path : None
271                       Test name : authentication
272                     Description : Sanity test for authentication options
273
274              Bug or CVE numbers : None
275            Reproducers to fetch : None
276               Required packages : httpd, vsftpd
277                   Architectures : All
278                        Releases : All
279                         Version : 1.0
280                            Time : 10m
281
282                        Priority : Normal
283                         License : GPLv2+
284                    Confidential : No
285                     Destructive : No
286
287                        Skeleton : beakerlib
288                          Author : Petr Splichal
289                           Email : psplicha@redhat.com
290
291          Directory Sanity/authentication created
292          File Sanity/authentication/PURPOSE written
293          File Sanity/authentication/runtest.sh written
294          File Sanity/authentication/Makefile written
295
296          # tree
297          .
298          `-- Sanity
299              |-- authentication
300              |   |-- Makefile
301              |   |-- PURPOSE
302              |   `-- runtest.sh
303              |-- download
304              |   |-- Makefile
305              |   |-- PURPOSE
306              |   `-- runtest.sh
307              |-- recursion
308              |   |-- Makefile
309              |   |-- PURPOSE
310              |   `-- runtest.sh
311              `-- rules
312                  |-- Makefile
313                  |-- PURPOSE
314                  `-- runtest.sh
315

NOTES

317       If you provide an option with a "?" you will be given a list of  avail‐
318       able options and a prompt to type your choice in.
319
320       For  working  Bugzilla  integration  you  need  python-bugzilla package
321       installed on your system.  If you are  trying  to  access  a  bug  with
322       restricted access, log in to Bugzilla first with the following command:
323
324          bugzilla login
325
326       You will be asked for email and password and after successfully logging
327       in a ~/.bugzillacookies file will be created which then will be used in
328       all  subsequent  Bugzilla  queries.  Logout  can  be  performed with rm
329       ~/.bugzillacookies ;-)
330

FILES

332       All commonly used preferences can be saved  into  ~/.beaker_client/wiz‐
333       ard.  Use "write" command to save current settings when reviewing gath‐
334       ered test data or edit the file with you favourite editor.
335
336       All options in the config file are self-explanatory. For confirm  level
337       choose one of: nothing, common or everything.
338

LIBRARY TASKS

340       The  "library"  skeleton  can  be  used  to create a "library task". It
341       allows you  to  bundle  together  common  functionality  which  may  be
342       required  across multiple tasks. To learn more, see the BeakerLib docu‐
343       mentation  for  library   tasks   <https://github.com/beakerlib/beaker
344       lib/wiki/man#rlimport>.
345

BUGS

347       If  you encounter an issue or have an idea for enhancement, please file
348       a     new     bug      <https://bugzilla.redhat.com/enter_bug.cgi?prod
349       uct=Beaker&component=command+line&short_desc=beaker-wizard:+&sta‐
350       tus_whiteboard=BeakerWizard&assigned_to=psplicha@redhat.com>.  See also
351       open         bugs        <https://bugzilla.redhat.com/buglist.cgi?prod
352       uct=Beaker&bug_status=__open__&short_desc=beaker-wiz‐
353       ard&short_desc_type=allwordssubstr>.
354

SEE ALSO

356       · Beaker documentation <http://beaker-project.org/help.html>
357
358       · BeakerLib <https://github.com/beakerlib/beakerlib>
359

AUTHOR

361       Petr Splichal <psplicha@redhat.com>
362
364       2013, Red Hat, Inc
365
366
367
368
36926.3                             Jan 25, 2019                 BEAKER-WIZARD(1)
Impressum