Questions tagged [locust]

Locust is a Python based load testing framework (http://locust.io/)

Locust is an open source load testing tool, where user behaviour is defined in pure Python code

862 questions
0
votes
1 answer

How do I fail a test when timeout is reached

When using the --run-time 0h01m arg I want the test to fail, however you get the standard: 10:59:36 [2020-07-15 09:59:32,838] jslave-traditional-v2-10-25-234-143/INFO/locust.main: Time limit reached. Stopping Locust. 10:59:36 [2020-07-15…
0
votes
2 answers

Download only relevant columns in locust csv

While trying to download the results from locust the data is getting downloaded with following headers: Type Name Timestamp # requests # failures Requests/s Requests Failed/s Median response time Average response time Min response…
Sayen
  • 65
  • 1
  • 11
0
votes
1 answer

Can multiple requests be passed in the on_start method in Locust?

I have recently started using locust. I wanted to know if it is possible to pass multiple requests in the on_start/on_stop methods in locust? I wish to send two POST requests in 'on_start' and then proceed to execute the remaining requests multiple…
0
votes
2 answers

how to write correct json in python

Can someone explain me why I'm getting 422 error? I have JSON from Postman and now I'm trying to send this JSON in Locust. BUt all the time I'm getting 422 error. This is JSON from Postman: data = {"startDate": "2020-10-01T00:00:00.000Z", …
margaret
  • 123
  • 2
  • 7
0
votes
1 answer

Locust + docker run with image old version doesn't work

I run docker run -p 8089:8089 -v ${PWD}:/locust locustio/locust:0.14.6 -f /locust/short.py and it displays an error message like a photo below But when I run with a new version docker run -p 8089:8089 -v ${PWD}:/locust locustio/locust -f…
Peter Phung
  • 43
  • 2
  • 6
0
votes
1 answer

Grouping of errors is Locust

I am trying to run a large test, which typically has lot of errors, But seems the errors are reported individually irrespective of the providing a safe name. What I am getting This is causing huge error list which is difficult in analyze, also I…
0
votes
2 answers

Locust worker not connecting to master

I have locust setup in docker. I have a master and worker nodes setup. I was using a pre-1.0 version and have now upgraded to 1.0.2 and now my workers can't connect to the master. I read through the release notes and changed the environmental…
0
votes
1 answer

Locust : sending current users & current users to DB(influxDB)

After few days of attempts, I decided to request your help on this. I am struggled to send locust's realtime data like, current rps, current active users count to the influxDB. User Class : starter.py class Users(HttpUser): wait_time =…
UtpMahesh
  • 410
  • 10
  • 25
0
votes
2 answers

Facing error "Address already in use" while running locust

While trying to run a locust file and convert the data in csv I'm facing this error in java with the dummy locustfile.py. I have tried editing the command and everything but nothing seems to be helping out. PFB ERROR: locust -f…
Sayen
  • 65
  • 1
  • 11
0
votes
0 answers

How to solve Visual Studio problem in Pycharm

I have a problem with installation of Locust in PyCharm. I have Microsoft Visual C++ already installed but it looks like PyCharm don't see it. How can I solve this problem? In language packages I have Polish and English Collecting locust …
margaret
  • 123
  • 2
  • 7
0
votes
1 answer

TypeError: individual_success_handle() missing 4 required positional arguments: 'request_type', 'name', 'response_time', and 'response_length'

I have been trying to integrate locust with influx db and while doing so I have implement EventHook, facing error "TypeError: individual_success_handle() missing 4 required positional arguments: 'request_type', 'name', 'response_time', and…
Sayen
  • 65
  • 1
  • 11
0
votes
1 answer

Save locust data to influxdb

I'm new to locust, influx and grafana and wanted to integrate locust with grafana for that, I have to use a time-based DB which was influx and wanted to store the locust data in influx DB. I have done some research online but no one has guided on…
Sayen
  • 65
  • 1
  • 11
0
votes
2 answers

error: IndexError: Cannot choose from an empty sequence in Locust

Trying to run my Locust file and while doing so I'm facing the following error while trying command locust -f locustfile.py --host=http://localhost:8080 File "/home/sonali/.local/lib/python3.6/site-packages/locust/user/task.py", line 280, in…
Sayen
  • 65
  • 1
  • 11
0
votes
2 answers

How do i generate 1800 rps in locust, from one locustfile?

I have a locustfile, which is for generating load for a certain target website. In my case i need to crate 1800 rps. but i am not able to generate that much in the single locustfile. So i have created 4 locust file and generate 450 rps for each. but…
Dibas Das
  • 3
  • 1
0
votes
1 answer

How can I translate this requests.post into a locust request?

I have a template for a Python function that calls an API and returns data. I'd like to run load testing against that API using locust. import requests proxies = {"http" : None, "https" : None} verify = "/data/certs/abc123.crt" def…
user263961
  • 47
  • 1
  • 4