0

I have recently started using locust.

I wanted to know if it is possible to pass multiple requests in the on_start/on_stop methods in locust?

I wish to send two POST requests in 'on_start' and then proceed to execute the remaining requests multiple times for a given duration. On clean-up, I wish to pass two POST requests in 'on_stop'.

Is this possible?

  • Hi @Aritra When I try to send two POST requests (to the same host) in on_start as well as on_stop, only the first request is executed in both the cases. Am I doing something differently? – Swati Baleri Jul 14 '20 at 15:46

1 Answers1

0

You can absolutely do that. However, you will not have the response time statistics available for those requests from the on_start/ on_stop methods. Also, I hope you are making these POST requests to the same host as your regular POST requests from the individual tasks.