905 questions
0
votes
0
answers
50
views
How to mock/proxify a class?
I need to proxify the websocket.WebSocketApp class but I can't change the code where the websocket is initialized.
I tried to patch the class with a custom class like this:
from locust.event import ...
0
votes
0
answers
63
views
Locust webui is not overriding the default values if any defaults are provided (Locust 2.43.0 / Python 3.14.2)
I'm new to both Python and Locust, so I might be doing something wrong.
If I define custom parameters like this:
@events.init_command_line_parser.add_listener
def _(parser):
parser.add_argument(&...
1
vote
0
answers
54
views
Locust POST Request with .xlsx File to Flask Endpoint Returns a 503 Error
I am testing my Python Flask app using Locust to load-test a POST request with an .xlsx file attachment. However, I consistently encounter a 503 Service Unavailable error.
This issue ONLY occurs when ...
1
vote
0
answers
55
views
Showing actual percentiles in locust reports
Is there a way to compute proper percentiles in Locust? The values are always rounded off to a multiple of 10.
I have read about Locust only estimating percentiles to save resources. But is there a ...
1
vote
0
answers
56
views
WebSocket transcripts not received until connection is closed during Locust load test
I’m performing a WebSocket load test using Locust with websocket-client and a Flask webhook that receives transcripts.
The WebSocket connection works, audio chunks are sent correctly, and my backend ...
1
vote
1
answer
94
views
How to use Locust with multiple base URLs
I want to compare API response for two base URLs, comparing the monolithic vs micro architecture performance, but my code keeps picking up only the 1 url and doesn't create any hits for other URL as ...
0
votes
0
answers
44
views
python locust - tasks per user
I have the following tasks in locustfile
tasks ={task1:1, task2:1,task3:1, task4:1,task5:1, task6:1}
And trying to run each one in parallel by running locust with 6 users (so there is one task run by ...
0
votes
0
answers
48
views
Locust is installed via pip but not able to check version of locust in windows system
enter image description hereI followed steps mentioned in https://docs.locust.io/en/stable/installation.html for installing locust. But I am getting the error
('locust' is not recognised as an ...
0
votes
1
answer
85
views
Locust distributed mode: "Unknown message type '_distributor_request' from worker.." warning halts users
I am using Locus in distributed mode with 1 master and n workers to run a load test.
I am also using the locust-plugins library to utilize its Distributor utility. My goal is to preallocate one unique ...
-3
votes
1
answer
107
views
Write CSV file with data in new row in python
I using python locust to do load test and my questions is i try to write csv file with email address as new row but it is separated the email charaters with ',' with each chracter like below:
z,b,r,X,...
1
vote
0
answers
72
views
Locust do not log success in case of GRPC endpoint returning a stream
Locust does not log success in case of GRPC endpoint returning a stream
Below is my setup:
locust==2.33
python
grpcio==1.70.0
grpcio-tools==1.62.1
protobuf==4.25.3
I am unable to see success on ...
1
vote
0
answers
56
views
Locust: Jump to next user only when previous user is done with all tasks mentioned in load sequence
I am looking for a way, where for the below code next user comes in action only if current user is done with all of the tasks mentioned in a sequence. That is user should not be switched unless all ...
-2
votes
1
answer
173
views
Locust Not Running
I had coded some simple locust load testing code in python. Previously, it running without any errors but after some time i run the code, the http request is not get executed.
class WebsiteUser(...
0
votes
1
answer
57
views
How to fix error "'WorkerNodes' object has no attribute 'encode'" while running code from Locust docs example of custom messages?
I am trying to do a distributed load generation and coordinate data between workers. There is an example of communicating across nodes from official Locust docs:
https://github.com/locustio/locust/...
0
votes
1
answer
150
views
Setting "self.client.headers" in a locust test by reading values from a config.txt file
I'm using configparser to read below values in a sample text file named config.txt:
cookie='StaticWebAppsAuthCookie=GKeVpelA4wK+udvu7de737v7v8cv8v'
Accept='*/*'
Accept-Encoding=' gzip, deflate, br'
...