locust
Locust is an easy to use, scriptable and scalable Python-based performance testing tool
Options
Name | Description |
---|---|
-v, --version | Show program's version number and exit |
-h, --help | Show this help message and exit |
-f, --locustfile <files......> | Show program's version number and exit |
--config <files......> | Config file path |
-H, --host | Host to load test in the following format: http://10.21.32.33 |
-u, --users | Peak number of concurrent Locust users. Primarily used together with --headless or --autostart |
-r, --spawn-rate | Rate to spawn users at (users per second). Primarily used together with --headless or --autostart |
-t, --run-time | Stop after the specified amount of time, e.g. (300s, 20m, 3h, 1h30m, etc.) |
-l, --list | Show list of possible User classes and exit |
--web-host | Host to bind the web interface to. Defaults to '*' (all interfaces) |
-P, --web-port | Port on which to run web host |
--headless | Disable the web interface, and start the test immediately |
--autostart | Starts the test immediately (without disabling the web UI) |
--autoquit | Quits Locust entirely, X seconds after the run is finished |
--web-auth | Turn on Basic Auth for the web interface. e.g. username:password |
--tls-cert <tls-cert> | Optional path to TLS certificate to use to serve over HTTPS |
--tls-key <tls-key> | Optional path to TLS private key to use to serve over HTTPS |
--class-picker | Enable select boxes in the web interface to choose from all available User classes and Shape classes |
--master | Set locust to run in distributed mode with this process as master |
--master-bind-host | Interfaces (hostname, ip) that locust master should bind to |
--master-bind-port | Port that locust master should bind to |
--expect-workers | How many workers master should expect to connect before starting the test (only when --headless/autostart is used) |
--expect-workers-max-wait | How long should the master wait for workers to connect before giving up. Defaults to wait forever |
--worker | Set locust to run in distributed mode with this process as worker |
--master-host | Host or IP address of locust master for distributed load testing. Only used when running with --worker. Defaults to 127.0.0.1 |
--master-port | Show list of possible User classes and exit |
--csv | Store current request stats to files in CSV format |
--csv-full-history | Store each stats entry in CSV format to _stats_history.csv file. You must also specify the '--csv' argument to enable this |
--print-stats | Print stats in the console |
--only-summary | Only print the summary stats |
--reset-stats | Reset statistics once spawning has been completed. Should be set on both master and workers when running in distributed mode |
--html | Store HTML report to file path specified |
--skip-log-setup | Disable Locust's logging setup. Instead, the configuration is provided by the Locust test or Python defaults. --loglevel LOGLEVEL, -L LOGLEVEL |
--loglevel <loglevel> | Choose between DEBUG/INFO/WARNING/ERROR/CRITICAL. Default is INFO |
--logfile <logfile> | Path to log file. If not set, log will go to stderr |
--show-task-ratio | Print table of the User classes' task execution ratio. Use this with non-zero --user option if some classes define non-zero fixed_count attribute |
--show-task-ratio-json | Print json data of the User classes' task execution ratio. Use this with non-zero --user option if some classes define non-zero fixed_count attribute |
--exit-code-on-error | Sets the process exit code to use when a test result contain any failure or error |
--equal-weights | Use equally distributed task weights, overriding the weights specified in the locustfile |
--enable-rebalancing | Allow to automatically rebalance users if new workers are added or removed during a test run |
-T, --tags | List of tags to include in the test, so only tasks with any matching tags will be executed |
--E, --exclude-tags | List of tags to exclude from the test, so only tasks with no matching tags will be executed |