Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Locust fails with unknown flag #21

Open
JamesLaverack opened this issue May 21, 2019 · 1 comment
Open

Locust fails with unknown flag #21

JamesLaverack opened this issue May 21, 2019 · 1 comment

Comments

@JamesLaverack
Copy link

Running the load test gives an error: no such option: --num-request message and exits.

Reproduction

  1. Install locust as per instructions pip install locustio
  2. Execute runLocust.sh with arguments

or, using Docker

  1. Build docker image as per instructions docker build -t load-test .
  2. Execute docker run load-test with arguments

Expected Behavior

Locust executes.

Actual Behavior

The following error:

$ ./runLocust.sh -h sock-shop.example.com -c 5 -r 10                                                                    
Default Locust file: locustfile.py
Will run locustfile.py against sock-shop.example.com. Spawning 5 clients and 10 total requests.
Usage: locust [options] [LocustClass [LocustClass2 ... ]]

locust: error: no such option: --num-request
done

or, using Docker

$ docker run load-test -h sock-shop.example.com -c 5 -r 10                
Locust file: /config/locustfile.py
Will run /config/locustfile.py against sock-shop.example.com. Spawning 5 clients and 10 total requests.
Usage: locust [options] [LocustClass [LocustClass2 ... ]]

locust: error: no such option: --num-request
done

Environment

Tool Version
Python Python 2.7.15rc1
Locust Locust 0.11.0
Docker 18.09.2
@JamesLaverack
Copy link
Author

JamesLaverack commented May 21, 2019

A couple of workarounds are possible. The https://hub.docker.com/r/weaveworksdemos/load-test image is available and appears to work:

docker run weaveworksdemos/load-test:0.1.1 -h sock-shop.example.com -c 5 -r 10

You can also ignore the run script and execute locust directly. The change appears to be moving from --num-request to --run-time:

locust --host=http://sock-shop.example.com -f locustfile.py --clients 10 --hatch-rate=5 --run-time=1m --no-web --only-summary

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant