Command Line options

AuTest provided a number of command and options to control behavior and functionality.

Commands

Command that AuTest supports

run

Find and run the tests. This is the default command that will run is no command is provided

--directory <path>
-D <path>

The directory to read the tests from.

Default: The current working directory.

Examples:

autest -D custom/tests
--autest-site <path> [path2 ...]

A user provided directory for extensions. Can be given more than one path. In this case all item will be loaded from both directories in the order of the path values provided. If provided the default location will not be used.

Default: to the autest-site directory under the path provided by the –directory options, i.e. ./autest-site

Examples:

Use a custom path for the extensions

autest -D custom/tests --autest-site ~MyExtensions

Use more than one path for the extensions.

autest -D custom/tests --autest-site path1 path2

Can be comma separated

autest -D custom/tests --autest-site path1, path2

or can be call multiple times

autest -D custom/tests --autest-site path1 --autest-site path2
--sandbox path

The directory in which all the test will run. This is useful in cases when the default path may be too long to run a test, or when unique locations are desired to keep test results around. The directory will be cleared before the run to prevent existing data from corrupting the test run.

Defaults to the value of ./_sandbox

Example:

autest --sandbox "run-$(date)"
--jobs N
-j N

the number of tests to run in parallel.

Currently not implemented beyond 1

Defaults to 1 or running test serially

--env var=value [key1=value1]

Adds a custom variable to the Environment used for running the tests. More than one variable can be added. Each variable added will replace any existing values in the current shell environment.

Examples:

autest --env PATH=/MyPath:$PATH MYVAR=MyValue
--filter <value> [value2 ...]
-f <value> [value2 ...]

Filter which tests to run based on the name and location of the test. Wildcard values can pass into help match which test(s) to run.

Examples:

Run all tests under the basic directory

autest --filter basic/*

Run all test that end with http

autest --filter http
--reporters name [name2 ...]
-R name [name2, ...]

Names of optional reporters to run as part of the report generation. (Currently there is only the default report generator, more will be added in the future)

--clean <level>
-C <level>

Level of cleaning for after a test is finished. all > exception > failed > warning > passed > skipped > unknown> none

Defaults “passed” - which will clean up all passed and skipped tests

Examples:

Leave no files in the sandbox

autest --clean all

Keep tests that passed. This is useful when creating a new test

autest -C passed

Keep all files in sandbox

autest -C none
--normalize-kill <value>

Normalizes the exit code when a process is given SIGKILL to an different value. Use this for cases in which the running the tests in an environment (such as certain docker setups) in which SIGINIT is blocked and AuTest is forced to kill the process instead.

list

List information about test found by the system

--json

output the information in json format

--directory <path>
-D <path>

The directory to read the tests from.

Default: The current working directory.

--filter <value> [value2 ...]
-f <value> [value2 ...]

Filter which tests to run based on the name and location of the test. Wildcard values can pass into help match which test(s) to run.

--env var=value [key1=value1]

Adds a custom variable to the Environment used for running the tests. More than one variable can be added. Each variable added will replace any existing values in the current shell environment.

--autest-site <path> [path2 ...]

A user provided directory for extensions. Can be given more than one path. In this case all item will be loaded from both directories in the order of the path values provided. If provided the default location will not be used.

Default: to the autest-site directory under the path provided by the –directory options, i.e. ./autest-site

General options

--version
-V

Prints the version of autest being used.

--help
-h

Print help text

Console options

Options that affect console output

--show-color

show color output <default>

--disable-color

disable color output

--verbose [category ...]

Print extra verbose messages about what the testing system is doing. If no argument is provided all messages will be reported.

--debug [category ...]

Print extra information that may help debug what the testing system is doing If no argument is provided all messages will be reported.