locustio / locust

Write scalable load tests in plain Python 🚗💨
MIT License
24.64k stars 2.96k forks source link

Dedicated Vuser for each API #564

Closed Sandyroy95 closed 4 years ago

Sandyroy95 commented 7 years ago

Hi all,

I am new to Locust. I am trying to write a script in which a each thread is running only one API i.e. I have 10 API's and I want to perform post operations for each of them. I wanna simulate 10 threads(locusts) in such a way that each thread performs POST for exactly one API. Can anyone give an idea on how to implement that? Thanks!!

seangerhardt-wf commented 7 years ago

I'd suggest reading http://docs.locust.io/en/latest/quickstart.html

You could create a class extending HttpLocust for each API, then it's up to you how many users/locusts you want to simulate.