The users on my site follow these actions:
- Send requests of Type A arbitrarily (meaning, I am satisfied with using something like
between(1.0,5.0)
- Send requests of Type B exactly every second (but must follow Type A)
- Send requests of Type C exactly every second (but must follow Type B)
- Send requests of Type D arbitrarily (but must follow Type C).
My idea was:
- Create a
TaskSet
for each request type (so that types B and C will havewait_time = between(1.0,1.0)
) - Use
self.interrupt()
in each request type once the request sets are exhausted.
However, how do I establish order (for example, B must happen only after A has finished)?
class WebsiteUser(HttpLocust):
task_set = [TypeA, TypeB, TypeC] #current idea, but this doesn't guarantee order between A,B,C.
wait_time = between(1.0, 1.0)