0

I'm very new to Locust and I'm having some problems. I have a python script that logs a user into our webpage and navigates to a certain point. We want to test the load of 1000s of users logging in the exact same way. I'm having trouble finding what I need in the Locust documentation, though.

Does anyone know if it's even possible to run a script that isn't a get/put action using Locust? If yes, is there a way to know the iteration that Locust is in and pass that number to the script? Ex: if it's just spawned user 234, pass 234 to the script so it can go get an id.

Does that make sense? Sorry if it's an obvious answer, I'm kind of wading through this on my own with no prior experience and I'm not really technical.

Thanks!

Brandy
  • 155
  • 3
  • 16
  • Why can you not emulate logging in and navigating through get/post requests? If you absolutely need to interact with a gui you could look at using selenium with locust. Maybe something like https://github.com/nickboucart/realbrowserlocusts works? – Metareven May 29 '20 at 14:05
  • Because it has to go through the ui to test what we need. I have the script already written that does what is needed, I just don't know how to make locust run it. Especially since I need distinct ids for every run. Thanks for the link. I'll check it out – Brandy May 29 '20 at 18:10
  • What is it that you do through the GUI that you cannot do through http-requests? The responses from the request contain the entire DOM + response headers and cookies which you can get information from for later requests. Locust is a load test application which is supposed to test a server (which accepts http-requests). Clicking around in the GUI does not generate load for the server unless it causes the client to send requests to it, which you could emulate by just doing the requests yourself instead of clicking the GUI – Metareven May 30 '20 at 21:25
  • Not what I'm asking for help with. Thanks – Brandy Jun 01 '20 at 12:11

0 Answers0