Skip to content

grizzly-cli

the command line interface for grizzly, which makes it easer to start a test with all features of grizzly wrapped up nicely. installing it is a matter of: pip install grizzly-loadtester-cli enable bash completion by adding the following to your shell profile: eval "$(grizzly-cli --bash-completion)"

Usage

grizzly-cli [-h] [--version [{all}]] {init,local,dist,auth} ...

Positional arguments

argument default help
command

Optional arguments

argument default help
--version print version of command line interface, and exit. add argument all to get
versions of dependencies

grizzly-cli init

create a skeleton project with required structure and files.

Usage

grizzly-cli init [-h] [--grizzly-version GRIZZLY_VERSION] [--with-mq] [-y]
                 project

Positional arguments

argument default help
project project name, a directory will be created with this name

Optional arguments

argument default help
--grizzly-version specify which grizzly version to use for project, default is latest
--with-mq False if grizzly should be installed with IBM MQ support (external dependencies
excluded)
-y, --yes False automagically answer yes on any questions

grizzly-cli local

commands for running grizzly in local mode.

Usage

grizzly-cli local [-h] {run} ...

Positional arguments

argument default help
subcommand

grizzly-cli local run

execute load test scenarios specified in a feature file.

Usage
grizzly-cli local run [-h] [--verbose] [-T TESTDATA_VARIABLE] [-y]
                      [-e ENVIRONMENT_FILE] [--csv-prefix [CSV_PREFIX]]
                      [--csv-interval CSV_INTERVAL]
                      [--csv-flush-interval CSV_FLUSH_INTERVAL] [-l LOG_FILE]
                      [--log-dir LOG_DIR] [--dump [DUMP]] [--dry-run]
                      file [file ...]
Positional arguments
argument default help
file path to feature file with one or more scenarios
Optional arguments
argument default help
--verbose False changes the log level to DEBUG, regardless of what it says in the feature
file. gives more verbose logging that can be useful when troubleshooting a
problem with a scenario.
-T, --testdata-variable specified in the format <name>=<value>. avoids being asked for an initial
value for a scenario variable.
-y, --yes False answer yes on any questions that would require confirmation
-e, --environment-file configuration file with environment specific
information
--csv-prefix write log statistics to CSV files with specified prefix, if no value is
specified the description of the gherkin Feature tag will be used, suffixed with
timestamp
--csv-interval interval that statistics is collected for CSV files, can only be used in
combination with --csv-prefix
--csv-flush-interval interval that CSV statistics is flushed to disk, can only be used in combination
with --csv-prefix
-l, --log-file save all grizzly-cli run output in specified log file
--log-dir log directory suffix (relative to requests/logs) to save log files generated
in a scenario
--dump Dump parsed contents of file, can be useful when including scenarios from other
feature files. If no argument is specified it will be dumped to stdout, the
argument is treated as a filename
--dry-run False Will setup and run anything up until when locust should start. Useful for
debugging feature files when developing new tests

grizzly-cli dist

commands for running grizzly i distributed mode.

Usage

grizzly-cli dist [-h] [--workers WORKERS] [--id ID]
                 [--limit-nofile LIMIT_NOFILE]
                 [--health-retries HEALTH_RETRIES]
                 [--health-timeout HEALTH_TIMEOUT]
                 [--health-interval HEALTH_INTERVAL] [--registry REGISTRY]
                 [--tty] [--wait-for-worker WAIT_FOR_WORKER]
                 [--project-name PROJECT_NAME]
                 [--force-build | --build | --validate-config]
                 {build,clean,run} ...

Positional arguments

argument default help
subcommand

Optional arguments

argument default help
--workers 1 how many instances of the workers container that should be created
--id unique identifier suffixed to compose project, should be used when the same user
needs to run more than one instance of grizzly-cli
--limit-nofile 10001 set system limit "number of open files"
--health-retries 3 set number of retries for health check of master container
--health-timeout 3 set timeout in seconds for health check of master container
--health-interval 5 set interval in seconds between health checks of master container
--registry push built image to this registry, if the registry has authentication you need
to login first
--tty False start containers with a TTY enabled
--wait-for-worker sets enviroment variable LOCUST_WAIT_FOR_WORKERS_REPORT_AFTER_RAMP_UP, which
tells master to wait this amount of time for worker report
--project-name override project name, which otherwise would be the name of the directory where
command is executed in
--force-build False force rebuild the grizzly projects container image (no cache)
--build False rebuild the grizzly projects container images (with cache)
--validate-config False validate and print compose project file

grizzly-cli dist build

build grizzly compose project container image before running test. if worker nodes runs on different physical computers, it is mandatory to build the images before hand and push to a registry.

if image includes IBM MQ native dependencies, the build time increases due to download times. it is possible to self- host the archive and override the download host with environment variable IBM_MQ_LIB_HOST.

Usage
grizzly-cli dist build [-h] [--no-cache] [--registry REGISTRY]
Optional arguments
argument default help
--no-cache False build container image with out cache (full build)
--registry push built image to this registry, if the registry has authentication you need
to login first

grizzly-cli dist clean

clean all grizzly compose project resources; containers, images, networks and volumes

Usage
grizzly-cli dist clean [-h] [--no-images] [--no-networks]
Optional arguments
argument default help
--no-images True do not remove images
--no-networks True do not remove networks

grizzly-cli dist run

execute load test scenarios specified in a feature file.

Usage
grizzly-cli dist run [-h] [--verbose] [-T TESTDATA_VARIABLE] [-y]
                     [-e ENVIRONMENT_FILE] [--csv-prefix [CSV_PREFIX]]
                     [--csv-interval CSV_INTERVAL]
                     [--csv-flush-interval CSV_FLUSH_INTERVAL] [-l LOG_FILE]
                     [--log-dir LOG_DIR] [--dump [DUMP]] [--dry-run]
                     file [file ...]
Positional arguments
argument default help
file path to feature file with one or more scenarios
Optional arguments
argument default help
--verbose False changes the log level to DEBUG, regardless of what it says in the feature
file. gives more verbose logging that can be useful when troubleshooting a
problem with a scenario.
-T, --testdata-variable specified in the format <name>=<value>. avoids being asked for an initial
value for a scenario variable.
-y, --yes False answer yes on any questions that would require confirmation
-e, --environment-file configuration file with environment specific
information
--csv-prefix write log statistics to CSV files with specified prefix, if no value is
specified the description of the gherkin Feature tag will be used, suffixed with
timestamp
--csv-interval interval that statistics is collected for CSV files, can only be used in
combination with --csv-prefix
--csv-flush-interval interval that CSV statistics is flushed to disk, can only be used in combination
with --csv-prefix
-l, --log-file save all grizzly-cli run output in specified log file
--log-dir log directory suffix (relative to requests/logs) to save log files generated
in a scenario
--dump Dump parsed contents of file, can be useful when including scenarios from other
feature files. If no argument is specified it will be dumped to stdout, the
argument is treated as a filename
--dry-run False Will setup and run anything up until when locust should start. Useful for
debugging feature files when developing new tests

grizzly-cli auth

grizzly stateless authenticator application

Usage

grizzly-cli auth [-h] [input]

Positional arguments

argument default help
input where to read OTP secret, nothing specified means environment variable
OTP_SECRET, - means stdin and anything else is considered a file