Locust docker container cannot find the locust file

I try to run locustfile in locustio/locust docker image and it cannot find the locustfile, despite the locustfile exists in the locust directory. ~ docker run -p 8089:8089 -v $PWD:/locust...

How to fail setup in Locust?

I'm doing a verification in my Locust setup and if that fails, I would like locust to exit immediately. To do that, I'm raising an exception, but locust continues with the tests until time limit...

Unable to uninstall locust from system

The current locust version is 2.1.0 I think I had installed it by pip3 install locust. It turns out I need the locust 1.2.2 version for my work project. Even after installing the locust 1.2.2...

Locust is not running

OS: Windows 7 Locust version:0.11.0 I am exploring the locust tool to see if i can use this tool in my project. I have created the below file to have hands-on but apparently script is not...

cannot import name 'HttpUser' from 'locust' error when running Locust in Kubernetes

I am deploying Locust on Kubernetes using Helm Charts(https://github.com/helm/charts/tree/master/stable/locust) 2 Worker pods are running with no errors, but master is in CrashLoopBackOff...

Using locust with pytest

I am trying to run locust using pytest. I have created this python file but it is not showing any output. pytest doesnot collect the test. How can I use locust with pytest ``` from locust import...

when run locust --master and client locust --master-host,locust can not run api stress,why?

qs when run locust --master and client locust --master-host, locust can not run api stress,why? env server: locust -f locustfile.py --master (centos) client: locust -f locustfile.py --worker...

Locust : HTTPConnectionClosed

I am using locust for load testing, I have deployed locust in kubernetes with master and workers. I am testing with 100 users and Hatch rate 20 users. After certain requests, I am continuously...

Access Locust Host attribute - Locust 1.0.0+

I had previously asked and solved the problem of dumping stats using an older version of locust, but the setup and teardown methods were removed in locust 1.0.0, and now I'm unable to get the host...

Kubernetes + locust (load testing)

Locust worker configuration had to be modified, the current workers are 130 nodes. I exported the deployment as yaml file, edited the file and applied the modifications in the locust worker. The...

With Locust, how can you access a specific locust-user from within a task?

I am using Locust to send various http requests to an endpoint. The endpoint may sometimes return a 401, indicating that the locust user needs a new bearer token. Does locust provide a way to...

Locust: Understanding cookie creation while using locust login

I am trying to use locust for login to my web application. I am at very beginning of using locust. I am using the following code for login to application. post_data = {'username':...

how to generate locust html file without UI?

how to generate locust html file without UI? locustfile = /mnt/locust/locustfile.py headless = true host = https://uat.xxx.biz users = 1000 spawn-rate = 1 run-time =...

Create Multiple Tasks in Locust

I want to run multiple load tests from Locust e.g. testing the front end and the backend. I was wondering if I could do this from a single locust file but pass which test I want to run as argument...

How to integrate custom scripts into locust helm chart stable/locust?

I have a repo for maintaining multiple locust scripts to load test many of my target-hosts/services. How to integrate these scripts into the helm installation of stable/locust on one of k8s...

Locust passing headers

Is it possible to have Locust pass a header command with a secure token to load test an API? I am trying to test our api for an encoder with a header flag for a token as the server being tested...

Testing UI with locust

I have been able to load test the backend APIs of my web application using locust in my CIT environment. Since the CIT is a protected environment, I had to manually login with my user in CIT...

Locust with Python: No Locust Stats are showing on UI

I am new to Locust (and Python) and am trying to load test an API. My Locust UI shows no stats whatsoever - no users hatched, no API calls, etc. I need help figuring out how to get them to show...

Locust: how I share auth cookie with the rest of tasks only for current locust user?

I am looking into to moving my multi-threaded python script to locust. A simple explanation of what my script does is: Create a thread per user In each thread authenticates user and get auth...

Parallel robot framework tests via locust

We are trying to run the automation tests written in robot framework in parallel using locust. As of now, we have been able to run the robot-framework test file through locust by using the...

Locust results not getting copied

I'm able to get locust results in logfile but when trying with csv, it doesn't seem to work. example that works : locust /locust/tests.py --host=http://127.0.0.1 -f locust_file.py...

Python locust not working in AWS instances

I am trying to use locust in ec2 instance for load testing of my project. So, I have installed locust using this command: python -m pip install locustio I got this below response: Requirement...

How to run locust from command line without disabling locust web UI

How to run locust from command line without disabling locust web UI? As per the locust documentation > To start tests directly, without using the web interface, use --headless. ref :...

Where can I find locust logs?

I'm using locust to stress test our app. I'm getting errors because the POST call seems incorrect. Where can I see the logs for locust? I'd like to see what the post call looks like to see what's...

locust : hooks -> run a custom code with locust performance testing environment

I am trying to run a code during the load testing is happening(eg push aggregated data to database). I am using locust init event handler -->...

System open file limit causing Locust error

I have a question about Locust. I wrote simple script just to check if Locust work. It should check if I can login to app which I'm testing with phone number and password. I start it with...

Locust IO failures 'BadStatusCode' meaning

I'm using locust to load test APIs, but everytime i'm testing API which need parameter other than authorization to be inputted like this : API which need data inputted it always fail at 100%...

Load testing with locust

I am using locust for load testing on an api. I am sending POST request is on that api. My USE CASE is that I want to check how many requests can the api take at a time. This is my code...

CPU Utilization while using locust

We are planning to use locust for performance testing. I have started locust in distributed mode on Kubernetes, with 800 Users for a duration of 5 minutes. Hatch rate is 100 as well. After a...

Understanding concurrent Locust users

Assume i have a server running in my local machine at port 8081. Now i want to perform a load test for it using locust. I have few doubts regarding few command line arguments. 1) -u , --users...