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
1 answer

LocustIO: How to do batch request

I started to use LocustIO for load testing a 3rd party API which provides a way to do batch requests (http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_BatchRequests). How can this be done using LocustIO? I tried with…
0
votes
2 answers

Cannot seem to import SequentialTaskSet

I'm working on my LocustFile and discovered SequentialTaskSet, but when I try to import it as I see countless times in examples and documentation, I get an error: lmint/ERROR/stderr: cannot import name 'SequentialTaskSet' from 'locust'…
0
votes
1 answer

How to use locust to achieve the function of similarity and collection point

How do I use locust to perform assembly point operations similar to loadrunner I want to execute a like loadrunner set a rendezvous on a request in a locust's task , As an example i want all the virtual users to execute a request at the same time
李雪源
  • 1
  • 1
0
votes
1 answer

How do i implement a locustfile where each locust takes unique value from csv files for it's task?

enter code here from locust import HttpLocust, TaskSet, task class ExampleTask(TaskSet): csvfile = open('failed.csv', 'r') data = csvfile.readlines() bakdata = list(data) @task def fun(self): try: value…
Dibas Das
  • 3
  • 1
0
votes
1 answer

Cannot load webUI correctly

I could get the page on localhost:8089 but not the style.css .These are the results from firefox and chrome: Firefox: GET http://localhost:8089/static/style.css?v=1.0 [HTTP/1.1 200 OK 17ms] The stylesheet…
0
votes
0 answers

Can Locust run a script that interacts with a UI?

I'm very new to Locust and I'm having some problems. I have a python script that logs a user into our webpage and navigates to a certain point. We want to test the load of 1000s of users logging in the exact same way. I'm having trouble finding…
Brandy
  • 155
  • 3
  • 16
0
votes
1 answer

mimic test_start test_stop events in distributed mode worker

In my locustfile I defined test_on_start and test_on_stop events to read a file needed for the test and to write detailed statistics in a CSV at the end of the test. when running in distributed mode, these events occur on the master, not the…
Chris Hare
  • 161
  • 2
  • 12
0
votes
2 answers

TypeError: When i run a locustfile.py

my problem is that i am trying to use locust for the first time and i copied the basic code from their website https://docs.locust.io/en/stable/quickstart.html this is the code that they have given from locust import HttpUser, task, between import…
Dev Chahal
  • 23
  • 5
0
votes
0 answers

locust.io fixed rate of calls to simulate a message queue

The goal is to simulate a message queue (Pup/Sub). TaskSets: A TaskSet has users which add messages to a message queue (global variable here). The higher the CCU, the more messages get added to the queue. A second TaskSet has user which directly…
David Gourde
  • 3,709
  • 2
  • 31
  • 65
0
votes
2 answers

how to get user context / thread id to distinguish between task sequences

I have a task sequence to execute multiple times, with multiple different users. Is there something I can write into the log file to identify an action being taken by user1 vs user2?
Chris Hare
  • 161
  • 2
  • 12
0
votes
1 answer

naming tasks with something than URL

I am testing a series of APIs and making different calls, some of which are against the same API but with different parameters. Is there a way to name the tasks so the Statistics will show a name other than the URL?
Chris Hare
  • 161
  • 2
  • 12
0
votes
1 answer

No Locust class found when running locustfile

I am just getting started with Locust. Here is my locustfile.py from locust import HttpLocust, TaskSet, between, TaskSequence def select_user(l): pass def get_company(l, company): target = "https://URL" print(f"Company: {company}…
Chris Hare
  • 161
  • 2
  • 12
0
votes
0 answers

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

I have install locsut in my system as follows: 1. pip install -U setuptools 2. pip install -U --pre locustio 3. pip install locustio But when i was importing from locust import HttpLocust , getting error that cannot import name 'HttpLocust' from…
Saurabh G
  • 19
  • 2
  • 8
0
votes
1 answer

A different way to define hatch rate of client in locust at the start?

I have a task which requires me to send 1 request per minute for 1000 services. I would like to control this behavior using hatch rate and clients where I will spawn 1 new client every minute and this will go on for 1000 clients. Currently, if my…
Avataar17
  • 627
  • 1
  • 6
  • 14
0
votes
1 answer

Locust or Jmeter for testing dashboard drill down reports

I am trying to weigh in on open source tools like Jmeter or locust for testing dashboard charts and reports. I have tested the Http URL with Jmeter but how can we test the charts or graphs or reports that are embedded in a HTML page? Is there an…
Arun.K
  • 103
  • 2
  • 4
  • 21