Following is my locust file :
`
from locust import HttpLocust, TaskSet, task
import yaml
import os
import sys
sys.path.append(os.getcwd())
class EntitySearchLoadTask(TaskSet):
def on_start(self):
self.login()
def login(self):
with self.client.get("/application/auth?action=login", catch_response=True,
auth=('<username>', '<password>'), name='Login') as response:
print "login"
print "status : " + str(response.status_code)
global headers
headers = {}
headers['Cookie'] = response.headers.get('Set-Cookie')
headers['X-CSRF-TOKEN'] = response.cookies['X-CSRF-TOKEN']
if response.status_code != 200:
print "status : "
print str(response.status_code)
print "content : "
print response.content
response.failure("Controller Login API failed : " + response.content)
@task(1)
def sampleTask(self):
global headers
print "task"
res = self.client.get("/application/restui/entity/search?searchText=tier 4", catch_response=True,
headers = headers)
print res.status_code
print "content : "
print res.json
class EntitySearchUserLocust(HttpLocust):
task_set = EntitySearchLoadTask
min_wait = 1000
max_wait = 5000
`
Its little urgent. Can someone help me ?

At the first glance, the call you do in your task uses catch_response. This means you should mark the request either successful or failed which you don't. That's why it is not registered at all.
Probably too late, but may the answer may help somebody in the future.
@heyman, I think this one can be closed.
Most helpful comment
At the first glance, the call you do in your task uses
catch_response. This means you should mark the request either successful or failed which you don't. That's why it is not registered at all.Probably too late, but may the answer may help somebody in the future.