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

How to interpret LocustIO's output / simulate short user visits

I like Locust, but I'm having a problem interpreting the results. e.g. my use case is that I have a petition site. I expect 10,000 people to sign the petition over a 12 hour period. I've written a locust file that simulates user behaviour: Some…
artfulrobot
  • 20,637
  • 11
  • 55
  • 81
0
votes
1 answer

Locust not supporting `--exit-code-on-error` argument?

Can someone help determining what I am doing wrong with having --exit-code-on-error? python -m locust.main -f tt/tt_test.py -H http://thuis:8088/public --no-web --clients=3 --hatch-rate=1 --run-time=1m --csv=social_soak…
0
votes
1 answer

Not able to install locust on windows

I installed locust using the command on windows py -m pip install locustio This is the output I got Collecting locustio Using cached…
dave Miller
  • 304
  • 1
  • 6
  • 16
0
votes
1 answer

How to complete the task 1 time for one user

I write a little task, and want to simulate 100 users, but i want to complete it 1 time for 1 user. Example: my task has 2 requests, so in total i want get 2 * 100 requests. I may stop it manually, but how to do it automatically?.
0
votes
3 answers

Python Locust 'locust' is not recognized as an internal or external command, operable program or batch file

I am using locust package which uses python. I am following this tutorial: https://docs.locust.io/en/latest/quickstart.html#example-locustfile-py But when i get to executing this code in command line; locust locustfile.py I get this error; 'locust'…
0
votes
1 answer

Locust invoking more requests than the number of users to simulate parameter

# # run command: locust --host=localhost:8000 # import inspect import time from settings import CONFIG from locust import Locust, TaskSet, task, events from lib.usermodule import user_create_service def stopwatch(func): def wrapper(*args,…
kosta
  • 4,302
  • 10
  • 50
  • 104
0
votes
2 answers

How can i get Bearer token using basic authentication using python?

I want to get an authorization token using basic authorization. I send a post request using my user name and password but to get the token a body data which is raw text grant_type=client_credentials&scope=Dashboard must contain in the request. but I…
Sakib Espak
  • 345
  • 2
  • 6
  • 16
0
votes
1 answer

Is there a way to replicate the same that's happening in postman using locust

I'm trying to post a request from postman using form data in body section where I upload a csv file and a JSON string, for which i get a response on postman. I would like to replicate the same in locust to do the load testing where I'm not be able…
Anu Abraham
  • 171
  • 1
  • 2
  • 12
0
votes
0 answers

how to pass custom command line to locust in no-web mode

I were using jmeter till now but i saw it is taking lots of resources and memory to run, so now i started reading locust. i am new to locust. i want to use locust in no-web mode e.g $ locust -f locust_files/my_locust_file.py --no-web -c 1000 -r 100…
Ruchika
  • 9
  • 3
0
votes
1 answer

reqs/sec not correct when load testing with Python Locust

In my testing, both min_wait and max_wait are set to 1 second, and I set users to 100, so I expect the reqs/sec to be close to 100. I know Locust actually need to wait server respond and then send the next request. Even though, if server respond…
Jcyrss
  • 1,513
  • 3
  • 19
  • 31
0
votes
2 answers

LocustIO: min_wait and max_wait not being applied

I am playing around LocustIO. I have a single self.client.get() task with my min_wait and max_wait were set to be 1 millisecond each. class App_User(HttpLocust): ... min_wait = 1 max_wait = 1 I was using logging to see the…
Dee
  • 401
  • 3
  • 9
  • 22
0
votes
1 answer

LocustIO: display logs while writing to log file

I have found a way to create log files on LocustIO. It successfully writes all logs in the file. Is there a way that the terminal display the logs and writes it on the log file as well? Just so I could easily monitor the results without opening…
Dee
  • 401
  • 3
  • 9
  • 22
0
votes
1 answer

LocustIO: User swarm

I am trying out Locust. Here you are able to swarm your system with simulated number of users within a specified hatch rate. class UserBehavior(TaskSet): def on_start(self): self.login() def login(self): payload =…
Dee
  • 401
  • 3
  • 9
  • 22
0
votes
2 answers

scaling django app that relies heavily on database queries

Hello I was load testing my social media platform with LocustIO that uses django 2.1 and SQlite3, and these are my results. Load Testing Results I need to make sure it can run for 10000+ visitors and have looked into caching options like redis. It…
Ty C
  • 69
  • 9
0
votes
1 answer

View Details on a "Failure" in Locust

I'm using a locust for the first time with a test suite written by other people. I'm getting results that look like this Name # reqs # fails Avg Min Max | Median …
Alana Storm
  • 164,128
  • 91
  • 395
  • 599