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
2 answers

Using Locust to run load test on multiple URLs loaded from CSV concurrently

Referring to my locusfile.py below: from locust import HttpLocust, TaskSet, between, task import csv class UserBehavior(TaskSet): @task(1) def index(l): with open ('topURL.csv') as csvfile: readCSV = csv.reader(csvfile,…
Kelvin Low
  • 678
  • 1
  • 10
  • 23
0
votes
1 answer

Syntax issue with correlating multiple values from redirects

I have one step that has multiple redirects and I need to call them and correlate values out of them to pass in subsequent calls. @seq_task(2) def Sign_in_with_site2_ID_btn (self): response =…
0
votes
1 answer

Does anyone know why I get a file not found error in Jenkins when opening a JSON file with Python (Locust)?

I'm using Locust for load testing - creating a lot of post requests to a server. Because I need to generate different fields for every request, The best way to do it in my opinion is to read the body from a file, change the relevant fields and send…
Raziv
  • 59
  • 5
0
votes
1 answer

How to remove HTTPError 429 from Locust API Statistics?

While I was performing load testing, I tried to increase the number of clients to reach a point where I began to receive HTTP Error 429's, "too many requests". The statistics for the API appear to include the response time when a 429 is returned.…
BBudak
  • 1
0
votes
1 answer

Error while Integrating graphite and locust

I am trying to send results from locust to graphite by using following def __init__(self): super(MyLocust, self).__init__() self.sock = socket.socket() self.sock.connect( ("localhost", 2003) ) locust.events.request_success +=…
Tester
  • 53
  • 2
  • 7
0
votes
0 answers

Slaves in locust are disconnecting automatically

I am running 10,000 users test in locust using 3 slaves, I am not giving any time out. after all the users are spawned the slaves are disconnected without any error showing, How to avoid this?
Tester
  • 53
  • 2
  • 7
0
votes
1 answer

get number of locusts and number of users in master

I'd like to annotate a load test in grafana via the API, and for that I need a way to access the number of connected slaves as well as the number of simulated users from the master (in order to then send that as an annotation to grafana). How can I…
0
votes
1 answer

How read data from csv file in locust performance test scripts?

I am trying to read the data from csv file that contails 1 row and 5 column using the following code def __init__(self): super(data, self).__init__() global data if (data == None): with open('var.csv', 'r') as…
Tester
  • 53
  • 2
  • 7
0
votes
0 answers

Locust installation - Visual Studio failed with exit status 1181

I'm trying to install locust but when I run the command pip install locust, I have an error with Visual Studio I think. I'm using Windows 10. This is the error : LINK : fatal error LNK1181: impossible to open the entry file 'ws2_32.lib' error:…
Fizik26
  • 753
  • 2
  • 10
  • 25
0
votes
2 answers

Locust Error: HttpError (u'405 Client Error: Not Allowed for url: https://..../login')

I am trying to do load test of a web server and I disabled the ssl certificate for that site using self.client.verify = False. from locust import HttpLocust, TaskSet, task class UserBehavior(TaskSet): def on_start(self): …
PaxPrz
  • 1,778
  • 1
  • 13
  • 29
0
votes
1 answer

How to perform correlation in locust

I have right boundary of div class=product-item data-productid=and a left boundary of > How can I perform correlation in locust. response.text does give me the entire response but I need to extract the value from the above boundaries How to do that?
Tester
  • 53
  • 2
  • 7
0
votes
1 answer

Can't get a 200 response from an API performing a post using the locustio

I am using Locust to try and perform a load test. I can't get a good (200) response from the API we are using. It continually gives me a: { "message": "Invalid API key", "status": 400 } However, using the same information I am using for Locust…
0
votes
1 answer

Locust seeming to fire request_success event hook 60x than my actual requests

I'm doing some load testing using Locust. For what it's worth, I am also using Graphite and Grafana for analytics of the results, but I can produce this issue without loading or using either one in my code. At it's most simple, the issue can be…
Answorth
  • 147
  • 1
  • 2
  • 10
0
votes
1 answer

Locust not generating failures.csv and expections.csv in distributed mode without UI in docker

When testing API using locust distributed mode without UI in docker. The distribution.csv, requests.csv are getting generated but the failures.csv and expection.csv are not getting generated but the requests.csv show failures as given…
Wasim Ansari
  • 260
  • 1
  • 4
0
votes
2 answers

How to use Locust for UI performance testing?

I would like to use Locust for UI performance testing. How to use Locust for UI performance testing? How can I get the loading time of the HTML elements(img, lists, etc..)? Thanks
user3669148
  • 43
  • 1
  • 2
  • 8