NAME

App::TestOnTap::Args

Commandline options and arguments understood for TestOnTap processing

SYNOPSIS

testontap
   [
       --usage | -?
           |
       --help | -h
           |
       --manual
           |
       --version
   ]
   [ -v | --verbose [ -v ... ] ]
   [ --workdirectory <path> ]
   [ { --skip || --include } <query> ]
   [ --jobs <n> ]
   [ --timer ]
   [ --execmap <mapfile> ]
   [ --archive ]
   [ --savedirectory <path> ]
   [ --define | -D <key>=<value> [ --define ... ] ]
   <suitepath>
   [<suiteargs> ...]

OPTIONS AND ARGUMENTS

All options can be abbreviated, as long as they are unambiguous. Option matching is case sensitive. Forcibly end option parsing using '--'.

EXPANDING FILES IN ARGUMENT LIST

The command line may at any place contain arguments of the form @filename, and which means that the filename will be read for arguments to insert in place. This will help if the command line is very long or is just nicely persisted for reuse.

Further, this will work recursively, i.e. a any resulting argument of the same form, will be read. If the filename is relative, it's assumed relative to the directory the previous file was in.

The example command line testontap --verbose @myargs will be expanded by reading the myargs file (in the current directory, obviously). The myargs file may contain a line of @/some/path/to/globalargs, and assuming that file in turn contains @extraargs, that file is expected to exist as /some/path/to/extraargs.

Each line in such a file will become a single argument using the following rules:

  • Line continuation

    To avoid physical lines in the file to be extremely long, it can be continued on the next physical (to any length) by ending the line with a backslash (\).

    Example:
      fee \
      fie \
      foo

    Will become the argument 'fee fie foo'.

  • Comments

    Any line (after completed line continuation and not counting inital whitespace) having a '#' as the first character, will be ignored as being a comment.

  • Trimming

    Any beginning and ending whitespace will be trimmed away.

  • Empty lines

    Any empty line will be ignored.

INFORMATION OPTIONS

If any of these options are given, the rest of the command line is ignored.

If multiple of these options are given only one will be acted on, in the order --manual, --help, --usage and --version.

--usage | -?

Displays basic usage information.

--help

Displays usage and help with options/arguments.

--manual

Displays the full manual page.

--version

Displays the script name and version information.

-v, --verbose

By default, the output will be regular test output after consuming TAP (e.g. timings, ok/fail messages, summary etc).

Using this option allows the pass through of more verbose output from the tests themselves.

To up verbosity, add one or more verbose flags (bundling for singlecharacter options is on, so '-vvv' is the same as '-v -v -v'). Currently, up to verbosity level 1 is used.

--workdirectory <path>

By default, a temporary directory is created to hold the data produced by the tests and is automatically removed when the run is complete.

Use this option if you want to keep the work dir after completion (for debugging/perusal/whatever). The path must not exist beforehand.

For details of the work directory, see the manual regarding 'persisted results'.

--skip <query> or --include <query>

Note: the --skip and --include flags are mutually exclusive - simply choose the one that is easiest to express your intention with.

By default, all tests will be run (subject to selection by the execmap in effect and the internally configured skip).

By providing a query, a subset of those tests can be skipped/included. However, be aware that the actual tests selected are also subject to any dependencies declared between tests - e.g. a query skipping test Z will still select test Z if there is a Y => Z dependency in the config.

For more on selecting tests, also see the manual regarding the 'skip' config setting.

--jobs <n>

By default, tests will run in sequence, governed by any dependencies, and sorted alphabetically. Also by default, they will always run serially.

By setting this option to a value higher than 1 allowing a maximum of n jobs to execute concurrently. However, for this to take effect, a parallelizable rule must be in the suite configuration in order to select which tests actually can run in parallel

The actual amount of concurrently executing jobs are then subject to limiting factors, such as dependencies and the parallelizability of a given test.

For more on parallelization, see the manual regarding the 'parallelizable' config setting.

--execmap <mapfile>

By default, the test suite will be searched for 'executables' based on the exec map defined in the suite, or a built in default if none defined.

This option allows overriding the choices of the suite/internal exec map.

For more on execmaps, see the manual regarding the 'execmap section' config setting.

--archive, --savedirectory <path>

By default, the results of a test run are not saved.

By providing either or both of these options, results may be saved as either a ready-made archive or a regular directory. The name of the saved file/directory will be named using the basename of the suite plus a timestamp and the run id, which together should be entirely unique.

Giving only --archive, the result will be saved as an archive in the current directory.

Giving --archive --savedirectory some/path together, the result will be saved as an archive in the directory some/path (the directory may or may not exist beforehand).

Giving only --savedirectory some/path, the result archive will be a regular subdirectory in the directory some/path (the directory may or may not exist beforehand).

For details of saved results, see the manual regarding 'persisted results'.

--define <key>=<value>

The function of this option is to make it possible to pass on arbitrary key/value pairs to a saved result in order to later enable various types of differentiation to be made when processing the saved result. The defines are not made available to tests.

Can be given multiple times.

suitepath

This is the path to the root directory of the suite, or to a zip archive containing a suite.

If it is a zip archive, the archive must contain only a directory at the zip root, and a valid testontap configuration file in that directory. It will be unpacked to a temporary location before being executed and cleaned up after.

For details on test suites, see the manual.

suiteargs ...

Any arguments can be passed, and they will just be passed on as-is to the tests when they start.

For details, see the manual on parameter passing.

MORE HELP

For full information on TestOnTap, see the manual, or use --manual or run perldoc App::TestOnTap to see the manual page.