Skip to content

Tag: locust

Is it possible to run code after finishing a locust instance?

Let’s say this is the primary file I would run in terminal i.e locusts -f main.py. Is it possible to have it also run code after the locust instance is terminated or when time limit is reached? Possibly a cleanup script or sending the csv reports generated somewhere. Answer There is a test_stop event (h…

Formatting Json for Python LocustIO

Why am I getting bad request for this post calls? It has to do with json formatting. How do I reformat the json object passed as param? I’m running a load test using LocustIO and Python. Answer json.dumps takes as input json object (lists & dictionaries) and serializes it giving a string as output. …