BEAKER-WIZARD(1)

πŸ“¦
version 29.2 Β· 3 versions
, in epel 9

πŸ’– BEAKER-WIZARD πŸ’–

Bestie, this is the beaker-wizard page from the Beaker manual β€” the little tool that makes creating a new Beaker task way easier πŸ’….

✨ NAME ✨

beaker-wizard β€” tool to ease the creation of a new Beaker task 🫢

🌸 SYNOPSIS 🌸

beaker-wizard [options] <testname> <bug>

The testname argument should be specified as:

[[[NAMESPACE/]PACKAGE/]TYPE/][PATH/]NAME

which can be shortened as you need:

TESTNAME
TYPE/TESTNAME
TYPE/PATH/TESTNAME
PACKAGE/TYPE/NAME
PACKAGE/TYPE/PATH/NAME
NAMESPACE/PACKAGE/TYPE/NAME
NAMESPACE/PACKAGE/TYPE/PATH/NAME

Also, there’s this iconic move:

beaker-wizard Makefile

This form runs the Wizard in Makefile edit mode, which lets you quickly and simply update metadata of an already existing test while trying to keep the rest of the Makefile untouched ✨.

πŸ¦‹ DESCRIPTION πŸ¦‹

Beaker Wizard is the tool that can transform that "create all the necessary files with correct names, values, and paths" boring phase of every test creation into one-line joy πŸ˜­πŸ’–. For power users there is a lot of inspiration in the man page. For quick start, just cd to your test package directory and simply run beaker-wizard.

The beaker-wizard was designed to be flexible: it’s intended not only for beginning Beaker users who will welcome questions with hints, but also for experienced test writers who can make use of the extensive command-line options to push their new-test-creating productivity to the limits πŸ”₯.

For basic usage help, see Options below or run beaker-wizard -h. For advanced features and expert usage examples, read on πŸ‘‘.

🌟 Highlights 🌟

  • provide reasonable defaults wherever possible
  • flexible confirmation (--every, --common, --yes)
  • predefined skeletons (beaker, beakerlib, simple, multihost, library, parametrized, empty)
  • saved user preferences (defaults, user skeletons, licenses)
  • Bugzilla integration (fetch bug info, reproducers, suggest name, description)
  • Makefile edit mode (quick adding of bugs, limiting archs or releases...)
  • automated adding created files to the git repository

🧚 Skeletons 🧚

Another interesting feature is that you can save your own skeletons into the preferences file, so that you can automatically populate the new test scripts with your favourite structure πŸŽ€.

All of the test related metadata gathered by the Wizard can be expanded inside the skeletons using XML tags. For example: use <package/> for expanding into the test package name or <test/> for the full test name.

The following metadata variables are available:

  • test namespace package type path testname description
  • bugs reproducers requires architectures releases version time
  • priority license confidential destructive
  • skeleton author email

πŸ’… OPTIONS πŸ’…

  • -h, --help β€” show this help message and exit
  • -V, --version β€” display version info and quit

🌸 Basic metadata 🌸

  • -d DESCRIPTION β€” short description
  • -a ARCHS β€” architectures [All]
  • -r RELEASES β€” releases [All]
  • -o PACKAGES β€” run for packages [wizard]
  • -q PACKAGES β€” required packages [wizard]
  • -t TIME β€” test time [5m]

πŸ’œ Extra metadata πŸ’œ

  • -z VERSION β€” test version [1.0]
  • -p PRIORITY β€” priority [Normal]
  • -l LICENSE β€” license [GPLv2+]
  • -i INTERNAL β€” confidential [No]
  • -u UGLY β€” destructive [No]

πŸŽ€ Author info πŸŽ€

  • -n NAME β€” your name [Petr Splichal]
  • -m MAIL β€” your email address [psplicha@redhat.com <psplicha@redhat.com>]

⭐ Test creation specifics ⭐

  • -s SKELETON β€” skeleton to use [beakerlib]
  • -j PREFIX β€” join the bug prefix to the testname [Yes]
  • -f, --force β€” force without review and overwrite existing files
  • -w, --write β€” write preferences to ~/.beaker_client/wizard
  • -b, --bugzilla β€” contact bugzilla to get bug details
  • -g, --git β€” add created files to the git repository

🫢 Confirmation and verbosity 🫢

  • -v, --verbose β€” display detailed info about every action
  • -e, --every β€” prompt for each and every available option
  • -c, --common β€” confirm only commonly used options [Default]
  • -y, --yes β€” yes, I'm sure, no questions, just do it!

πŸŽ€ EXAMPLES πŸŽ€

Some brief examples, bestie:

beaker-wizard overload-performance 379791
    regression test with specified bug and name
    -> /CoreOS/perl/Regression/bz379791-overload-performance

beaker-wizard buffer-overflow 2008-1071 -a i386
    security test with specified CVE and name, i386 arch only
    -> /CoreOS/perl/Security/CVE-2008-1071-buffer-overflow

beaker-wizard Sanity/options -y -a?
    sanity test with given name, ask just for architecture
    -> /CoreOS/perl/Sanity/options

beaker-wizard Sanity/server/smoke
    add an optional path under test type directory
    -> /CoreOS/perl/Sanity/server/smoke

beaker-wizard -by 1234
    contact bugzilla for details, no questions, just review
    -> /CoreOS/installer/Regression/bz1234-Swap-partition-Installer

beaker-wizard -byf 2007-0455
    security test, no questions, no review, overwrite existing files
    -> /CoreOS/gd/Security/CVE-2007-0455-gd-buffer-overrun

All of the previous examples assume you’re in the package tests directory (e.g. cd git/tests/perl). All the necessary directories and files are created under this location πŸ’–.

πŸ› Bugzilla integration πŸ›

The following example creates a regression test for bug #227655. Option -b is used to contact Bugzilla to automatically fetch bug details, and -y skips unnecessary questions 😌.

# beaker-wizard -by 227655
Contacting bugzilla...
Fetching details for bz227655
Examining attachments for possible reproducers
Adding test.pl (simple test using Net::Config)
Adding libnet.cfg (libnet.cfg test config file)

Ready to create the test, please review
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/CoreOS/perl/Regression/bz227655-libnet-cfg-in-wrong-directory

             Namespace : CoreOS
               Package : perl
             Test type : Regression
         Relative path : None
             Test name : bz227655-libnet-cfg-in-wrong-directory
           Description : Test for bz227655 (libnet.cfg in wrong directory)

    Bug or CVE numbers : bz227655
  Reproducers to fetch : test.pl, libnet.cfg
     Required packages : None
         Architectures : All
              Releases : All
               Version : 1.0
                  Time : 5m

              Priority : Normal
               License : GPLv2+
          Confidential : No
           Destructive : No

              Skeleton : beakerlib
                Author : Petr Splichal
                 Email : psplicha@redhat.com

[Everything OK?]
Directory Regression/bz227655-libnet-cfg-in-wrong-directory created
File Regression/bz227655-libnet-cfg-in-wrong-directory/PURPOSE written
File Regression/bz227655-libnet-cfg-in-wrong-directory/runtest.sh written
File Regression/bz227655-libnet-cfg-in-wrong-directory/Makefile written
Attachment test.pl downloaded
Attachment libnet.cfg downloaded

⌨️ Command line ⌨️

The extensive command line syntax can come in handy, for example when creating a bunch of sanity tests for a component. Let’s create a test skeleton for each of wget’s feature areas πŸ¦‹:

# cd git/tests/wget
# for test in download recursion rules authentication; do
>   beaker-wizard -yf $test -t 10m -q httpd,vsftpd \
>       -d "Sanity test for $test options"
> done

...

/CoreOS/wget/Sanity/authentication

             Namespace : CoreOS
               Package : wget
             Test type : Sanity
         Relative path : None
             Test name : authentication
           Description : Sanity test for authentication options

    Bug or CVE numbers : None
  Reproducers to fetch : None
     Required packages : httpd, vsftpd
         Architectures : All
              Releases : All
               Version : 1.0
                  Time : 10m

              Priority : Normal
               License : GPLv2+
          Confidential : No
           Destructive : No

              Skeleton : beakerlib
                Author : Petr Splichal
                 Email : psplicha@redhat.com

Directory Sanity/authentication created
File Sanity/authentication/PURPOSE written
File Sanity/authentication/runtest.sh written
File Sanity/authentication/Makefile written

# tree
.
`-- Sanity
    |-- authentication
    |   |-- Makefile
    |   |-- PURPOSE
    |   `-- runtest.sh
    |-- download
    |   |-- Makefile
    |   |-- PURPOSE
    |   `-- runtest.sh
    |-- recursion
    |   |-- Makefile
    |   |-- PURPOSE
    |   `-- runtest.sh
    `-- rules
        |-- Makefile
        |-- PURPOSE
        `-- runtest.sh

🌸 NOTES 🌸

If you provide an option with a ? you will be given a list of available options and a prompt to type your choice in πŸ‘€.

For working Bugzilla integration you need python-bugzilla package installed on your system. If you are trying to access a bug with restricted access, log in to Bugzilla first with the following command:

bugzilla login

You will be asked for email and password, and after successfully logging in a ~/.bugzillacookies file will be created which then will be used in all subsequent Bugzilla queries. Logout can be performed with rm ~/.bugzillacookies ;-)

πŸŽ€ FILES πŸŽ€

All commonly used preferences can be saved into ~/.beaker_client/wizard. Use the write command to save current settings when reviewing gathered test data, or edit the file with your favourite editor ✨.

All options in the config file are self-explanatory. For confirm level choose one of: nothing, common or everything.

πŸ¦‹ LIBRARY TASKS πŸ¦‹

The "library" skeleton can be used to create a "library task". It allows you to bundle together common functionality which may be required across multiple tasks. To learn more, see the BeakerLib documentation for library tasks <https://github.com/beakerlib/beakerlib/wiki/man#rlimport>.

πŸ› BUGS πŸ›

Okay bestie, so if something's acting up β€” or honestly if you just had a little brainwave about how this could be even better β€” the move is to file a new bug. That's the whole vibe. Don't suffer in silence, don't just scream into the group chat, actually file it πŸ’…

  • File a new bug β€” go straight to the Beaker Bugzilla entry form, product Beaker, component command line, and make sure the short description starts with beaker-wizard: and the status whiteboard says BeakerWizard, and it gets assigned to psplicha@redhat.com. Like, literally the form is pre-filled with all that, so you just gotta show up 🫢
https://bugzilla.redhat.com/enter_bug.cgi?product=Beaker&component=command+line&short_desc=beaker-wizard:+&status_whiteboard=BeakerWizard&assigned_to=psplicha@redhat.com
  • Peep the open bugs β€” before you file, lowkey check if someone already beat you to it (no cap, it happens all the time):
https://bugzilla.redhat.com/buglist.cgi?product=Beaker&bug_status=__open__&short_desc=beaker-wizard&short_desc_type=allwordssubstr

That second link is filtered by product Beaker, status __open__, short description beaker-wizard with short_desc_type=allwordssubstr β€” iykyk, that's the "has anyone else noticed this" button ✨


πŸ‘€ SEE ALSO πŸ‘€

A couple of places to go next, bestie β€” these are the good links:

  • Beaker documentation β€” the actual docs, the lore, the whole story 🌈
http://beaker-project.org/help.html
  • BeakerLib β€” the library over on GitHub, if you wanna get into the weeds πŸ¦‹
https://github.com/beakerlib/beakerlib

🌸 AUTHOR 🌸

Petr Splichal β€” <psplicha@redhat.com> β€” the main character who made this happen, we stan πŸ‘‘


2013-2025 Red Hat, Inc. β€” all the years, all the rights, iconic behavior fr fr πŸ’–


And that's a wrap on BEAKER-WIZARD(1)! This gorgeous thing comes to you as version 29.2, dated May 26, 2025, and honestly? She ate. Go make some tasks, bestie β€” the wizard believes in you πŸ§šβ€β™€οΈβ­πŸ’œ

πŸ“¦ where this page comes from