how to pass custom parameters to a locust test class?

You could use like env <parameter>=<value> locust <options> and use <parameter> inside the locust script to use its value E.g., env IP_ADDRESS=100.0.1.1 locust -f locust-file.py –no-web –clients=5 –hatch-rate=1 –num-request=500 and use IP_ADDRESS inside the locust script to access its value which is 100.0.1.1 in this case.

Locust passing headers

Yes, you can use: token_string = “token string” resp = self.client.post( url=”http://someserver”, data=json.dumps(data), auth=None, headers={“authorization”: “Token ” + token_string}, name=”http://someserver”, )

Way to use locust.io by supplying user list

Locust author here. By default, each HttpLocust user instance has an HTTP client that has it’s own separate session. Locust doesn’t have any feature for providing a list of user credentials or similar. However, your load testing scripts are just python code, and luckily it’s trivial to implement this yourself. Here’s a short example: # … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)