Locust Load Testing v2.20.1 self.stop() not working

45 Views Asked by At

I'm using locust v2.20.1 and I would like to spawn 10 users but I only want each user to run the task once. I am not spawning workers (distrubuted runs) so using the self.environment.runner.quit() function stops the entire process and not that particular user.

I've noticed that there's a self.stop() function which should stop that task from running once again but when I run it, I get the following error: **locust.runners: While stopping users, we encountered a user that didn't have proper args <Greenlet "Greenlet-3" at 0x156f680cc20: _run> **

It also doesn't stop the task from running. How can I spawn n users which only run the task once?

self.environment.runners.stop() - it stops the entire test (all users - i only want to stop a particular user once it reaches a point within the task) self.stop() - does not work, it gives the following error: **locust.runners: While stopping users, we encountered a user that didn't have proper args <Greenlet "Greenlet-3" at 0x156f680cc20: _run> **

0

There are 0 best solutions below