Debugging
Oftentimes you will encounter errors or not get the appropriate load you expect when running tests.
Things you can use to get more information:
Add print statements to your Locust code or the installed
appian-locust
libraryInspect the output of the latencies that Locust periodically prints out, to see if certain requests are much slower than you expect
Verify using the browser console that the requests you are attempting to simulate match up with what Locust/appian-locust is sending
Setting the “record_mode” attribute to True on your HttpUser’s
client
object will create a “recorded_responses” folder which will contain all requests and responses sent during test execution. You can do this in the__init__
method of your HttpUser, like so:
def __init__(self, environment) -> None:
super().__init__(environment)
self.client.record_mode = True