click-extra test-suite - Run declarative CLI test cases against a
command or binary.
click-extra test-suite [OPTIONS]
Run declarative CLI test cases against a command or binary.
Resolves the suite by precedence: --suite-file or --suite-envvar,
then the [tool.click-extra.test-suite] config (cases, then file), then a
built-in default. Each case invokes the target with its parameters and
checks the exit code and output.
Cases run in parallel by default (see --jobs): each is an
independent process invocation, so they overlap well. Pass --jobs max to use
every logical core, or --jobs 1 for sequential execution, which lets
--exit-on-error stop on the first failure.
On an interactive terminal a spinner reports how many cases have
finished. It stays silent in pipes and CI logs, and --no-progress or
--accessible turns it off.
- --command /
--binary COMMAND
- Path to the binary file to test, or a command line to be executed.
[required]
- -F / --suite-file
FILE_PATH
- Path to a test suite file; its format is taken from the extension (YAML,
TOML, JSON, JSON5, JSONC, Hjson). Repeat to run multiple suites in
sequence. Without any suite source, a built-in default suite runs.
- -E / --suite-envvar
ENVVAR_NAME
- Name of an environment variable holding a test suite in YAML. Repeat to
collect multiple suites.
- -t / --select-test
INTEGER
- Only run the cases with these 1-based numbers. Repeat to select several;
omit to run them all.
- -s / --skip-platform
[aarch64|aix|alacritty|all_agents|all_architectures|all_arm|all_ci|all_mips|all_platforms|all_shells|all_sparc|all_terminals|all_traits|all_windows|alpine|altlinux|amzn|android|apple_terminal|arch|arch_32_bit|arch_64_bit|arm|armv5tel|armv6l|armv7l|armv8l|ash|azure_pipelines|bamboo|bash|big_endian|bourne_shells|bsd|bsd_without_macos|buildkite|buildroot|c_shells|cachyos|centos|circle_ci|cirrus_ci|claude_code|cline|cloudlinux|cmd|codebuild|contour|csh|cursor|cygwin|dash|debian|dragonfly_bsd|exherbo|fedora|fish|foot|freebsd|generic_linux|gentoo|ghostty|github_ci|gitlab_ci|gnome_terminal|gnu_screen|gpu_terminals|guix|guix_build|haiku|heroku_ci|hurd|hyper|i386|i586|i686|ibm_mainframe|ibm_powerkvm|illumos|iterm2|kali|kitty|konsole|ksh|kvmibm|linux|linux_layers|linux_like|linuxmint|little_endian|loongarch|loongarch64|macos|mageia|mandriva|manjaro|midnightbsd|mips|mips64|mips64el|mipsel|multiplexers|native_terminals|netbsd|nixos|nobara|nushell|openbsd|opensuse|openwrt|oracle|os400|other_posix|other_shells|parallels|pidora|powerpc|powershell|ppc|ppc64|ppc64le|raspbian|rhel|rio|riscv|riscv32|riscv64|rocky|s390x|scientific|sh|slackware|sles|solaris|sparc|sparc64|sunos|system_v|tabby|tcsh|teamcity|tilix|tmux|travis_ci|tumbleweed|tuxedo|ubuntu|ultramarine|unix|unix_layers|unix_without_macos|void|vscode_terminal|wasm32|wasm64|web_terminals|webassembly|wezterm|windows|windows_shells|windows_terminal|wsl1|wsl2|x86|x86_64|xenserver|xonsh|xterm|zellij|zsh]
- Skip cases on these platforms. Repeat to skip several.
- -x /
--exit-on-error
- Exit instantly on the first failed case (sequential runs only).
- -T / --timeout
SECONDS
- Default timeout for each CLI call, unless the case sets its own.
- --show-trace-on-error /
--hide-trace-on-error
- Show the execution trace of failed cases.
- --stats /
--no-stats
- Print the worker summary and the result tally.
- --time /
--no-time
- Measure and print elapsed execution time.
- --config
CONFIG_PATH
- Location of the configuration file. Supports local path with glob patterns
or remote URL.
- --no-config
- Ignore all configuration files and only use command line parameters and
environment variables.
- --validate-config
FILE
- Validate the configuration file and exit.
- --export-config
FORMAT
- Export the configuration in the selected format to <stdout>, then
exit.
- --accessible
- Accessibility mode: disable colors and render tables in a plain,
screen-reader-friendly format.
- --color[=auto|always|never]
- Colorize the output. A bare --color is the same as --color=always.
- --no-color
- Disable colorization (alias of --color=never).
- --progress /
--no-progress
- Show progress indicators during long operations. Disabled for
non-interactive output (pipes, dumb terminals, CI) and by
--accessible.
- --theme
[dark|dracula|light|manpage|monokai|nord|solarized_dark]
- Color theme used for help screens.
- --show-params
- Show all CLI parameters, their provenance, defaults and value, then
exit.
- --table-format
[aligned|asciidoc|colon-grid|csv|csv-excel|csv-excel-tab|csv-unix|double-grid|double-outline|fancy-grid|fancy-outline|github|grid|heavy-grid|heavy-outline|hjson|html|jira|json|json5|jsonc|latex|latex-booktabs|latex-longtable|latex-raw|mediawiki|mixed-grid|mixed-outline|moinmoin|orgtbl|outline|pipe|plain|presto|pretty|psql|rounded-grid|rounded-outline|rst|simple|simple-grid|simple-outline|textile|toml|tsv|unsafehtml|vertical|xml|yaml|youtrack]
- Rendering style of tables.
- --verbosity
LEVEL
- Either CRITICAL, ERROR, WARNING, INFO, DEBUG.
- --verbose /
-v
- --quiet /
-q
- --man
- Show the command's man page (roff) and exit.
- --version
- Show the version and exit.
- --jobs
[auto|max|INTEGER]
- Number of parallel jobs. Accepts an integer, 'auto' (one fewer than the
host's logical CPUs) or 'max' (all logical CPUs). 0 runs
sequentially.
- -h / --help
- Show this message and exit.
- TEST_SUITE_COMMAND
- Path to the binary file to test, or a command line to be executed.
- TEST_SUITE_SUITE_FILE
- Path to a test suite file; its format is taken from the extension (YAML,
TOML, JSON, JSON5, JSONC, Hjson). Repeat to run multiple suites in
sequence. Without any suite source, a built-in default suite runs.
- TEST_SUITE_SUITE_ENVVAR
- Name of an environment variable holding a test suite in YAML. Repeat to
collect multiple suites.
- TEST_SUITE_SELECT_TEST
- Only run the cases with these 1-based numbers. Repeat to select several;
omit to run them all.
- TEST_SUITE_SKIP_PLATFORM
- Skip cases on these platforms. Repeat to skip several.
- TEST_SUITE_EXIT_ON_ERROR
- Exit instantly on the first failed case (sequential runs only).
- TEST_SUITE_TIMEOUT
- Default timeout for each CLI call, unless the case sets its own.
- TEST_SUITE_SHOW_TRACE_ON_ERROR
- Show the execution trace of failed cases.
- TEST_SUITE_STATS
- Print the worker summary and the result tally.
- TEST_SUITE_TIME
- Measure and print elapsed execution time.
- TEST_SUITE_CONFIG
- Location of the configuration file. Supports local path with glob patterns
or remote URL.
- TEST_SUITE_VALIDATE_CONFIG
- Validate the configuration file and exit.
- TEST_SUITE_EXPORT_CONFIG
- Export the configuration in the selected format to <stdout>, then
exit.
- TEST_SUITE_ACCESSIBLE
- Accessibility mode: disable colors and render tables in a plain,
screen-reader-friendly format.
- TEST_SUITE_COLOR
- Colorize the output. A bare --color is the same as --color=always.
- TEST_SUITE_NO_COLOR
- Disable colorization (alias of --color=never).
- TEST_SUITE_PROGRESS
- Show progress indicators during long operations. Disabled for
non-interactive output (pipes, dumb terminals, CI) and by
--accessible.
- TEST_SUITE_THEME
- Color theme used for help screens.
- TEST_SUITE_SHOW_PARAMS
- Show all CLI parameters, their provenance, defaults and value, then
exit.
- TEST_SUITE_TABLE_FORMAT
- Rendering style of tables.
- TEST_SUITE_VERBOSITY
- Either CRITICAL, ERROR, WARNING, INFO, DEBUG.
- TEST_SUITE_VERBOSE
- TEST_SUITE_QUIET
- TEST_SUITE_MAN
- Show the command's man page (roff) and exit.
- TEST_SUITE_VERSION
- Show the version and exit.
- TEST_SUITE_JOBS
- Number of parallel jobs. Accepts an integer, 'auto' (one fewer than the
host's logical CPUs) or 'max' (all logical CPUs). 0 runs
sequentially.
- TEST_SUITE_HELP
- Show this message and exit.
~/.config/click-extra/{*.toml,*.yaml,*.yml,*.json,*.json5,*.jsonc,*.hjson,*.ini,*.xml,pyproject.toml}
- 0
- Success.
- 1
- A runtime error, or an aborted prompt (Ctrl-C, a declined
confirmation).
- 2
- A usage error: unknown option, invalid value, missing operand, or an
unparsable configuration file.