Locust : How to make locust run for a specific amount of time

official locustio documentation tells about how to write simple locust tasks which run indefinitely. Couldn't find out how to run load which lasts for a specific amount of time, so that the test...

Integrating LocustIO results in Jenkins' performance plugin

I am using Locust to fire a large number of queries to an api. The results of this process are saved as the normal csv files. Since I am running Locust through command line, I have rewritten the...

Locustio (Python) login

I want to make some load tests on the website. First of all, that's my code: from locust import HttpLocust, TaskSet, task class UserBehavior(TaskSet): def on_start(self): """ on_start is...

Formatting Json for Python LocustIO

Why am I getting bad request for this post calls? It has to do with json formatting. How do I reformat the json object passed as param? I'm running a load test using LocustIO and Python. from...

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...

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...

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): ...

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...

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 ...

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...

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...

How to login to Flask App when using Locust

First time using Locust. I have a Flask App that requires user to login to access most routes. I cant get Locust to successfully login to my Flask App. Here is my Locust.py file: from locust...

zsh: command not found: locust (although locust is already installed using pip on my ubuntu 19)

I installed locustio on my ubuntu using pip "pip install locustio" the problem is that everytime I run any locust command on my console (for example) locust --version the console returns...

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...

Unable to install locust on windows

Hi i am trying to install locust on windows with python version 3.7.3, using pip install locustio but getting below error. ERROR: Could not build wheels for gevent which use PEP 517 and cannot be...

How can I resolve a 401 Client Error: Unauthorized for url returned on locustio script?

I am trying to write a load test script with locustio, the task is to first log in and pick access_token from the login response, then the access_token is parsed as a request header for the second...

Connection refused error (111) when using Locust for Performance Testing against docker-compose app

I am using Locust, a performance testing tool, to load test an application that is setup to run within docker-compose. I get the following error (connection refused, error 111) for every...

How to run master/slave Locust runner programmatically so slaves stops at the end

I have this simple master/slave scripts, using locustio==0.13.5. This is the master: #!/usr/bin/env python3 import logging import argparse import os import sys import time import urllib3 import...

How to rename python locust actions?

I have the next code from locustio documentation: from locust import HttpLocust, TaskSet, between def login(l): l.client.post("/login", {"username":"ellen_key", "password":"education"}) def...

Installing locustio 0.14 using ansible playbook

I am new to ansible and writing a playbook to install locustio with python3 on a Ubuntu 18.04. I don't know how to install locustio with pip3 in playbook. If use pip package, then it gives error...

How to auto scale Locust in Kubernetes

I couldn't find any information on autoscaling for Locust worker pods in kubernetes, and I've tried to deploy a horizontal pod autoscaler for the workers but noticed that the newly spun up pods...

locust is not installing on my windows 10 for load testing

I tried installing this pip but getting some error, I want this package module for load testing This is the output i am getting: Collecting locustio Collecting geventhttpclient-wheels==1.3.1.dev2...

Cannot import name 'User' from 'Locust' library

I'm quite new to Locust, just starter tinkering with it a couple of days ago. Previously I followed someone else's example which was using: class WebsiteUser(HttpLocust): # Do stuff But after...

cannot import name 'HttpLocust' from 'locust.user.users'

I have install locsut in my system as follows: pip install -U setuptools pip install -U --pre locustio pip install locustio But when i was importing from locust import HttpLocust , getting...

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...

LocustIO - how to send DELETE query only once

I am facing with locustIO problem. Here is the code: @task def delete_test(self): for number in range(0, 10): response = self.client.request(method="GET", url="api/number/%s" % number, ...

Docker Locust locustfile.py not found

I need to create an image from https://hub.docker.com/r/locustio/locust that contains the locustfile.py. I use this Dockerfile: FROM locustio/locust:1.1.1 ADD locustfile.py /mnt/locust RUN pip3...

TypeError: __init__() takes 1 positional argument but 2 were given Python

from locust import HttpLocust, TaskSet, task, between, events, Locust, User, HttpUser import vertica_python import time, logging def get_sample_query(): query = ''' SELECT COUNT(*)...

How to increase RPS in distributed locust load test

I cannot get past 1200 RPS no matter if I use 4 or 5 workers. I tried to start locust in 3 variations -- one, four, and five worker processes (docker-compose up --scale...

Issue Installing Locustio(0.7.5) Package

macOS == 10.15.7 || Django Project || Python 3.6.7 When I'm trying to install locustio version 0.7.5 package from pip it's giving error.I have tried the fixes mentioned in all the versions of...