Referring to my locusfile.py
below:
from locust import HttpLocust, TaskSet, between, task
import csv
class UserBehavior(TaskSet):
@task(1)
def index(l):
with open ('topURL.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
for row in readCSV:
l.client.get("%s" % (row[0]))
class WebsiteUser(HttpLocust):
task_set = UserBehavior
wait_time = between(5.0, 9.0)
When I execute this script, Locust was able to run without any error. However, it'll loop through each row and load test only the latest URL. As it reads the next URL, the previous URL is no longer being load tested. What I want instead is for Locust to load test more and more URLs concurrently as it reads row by row from the CSV.
Edit
I managed to achieve partial concurrency by setting wait_time = between(0.0, 0.0)