Option in Locust to run multiple Locustfile together like in Jmeter running multiple Thread Groups in Parallel

Viewed 693

I have requirement to run performance test suite, where each script will consist of set of REST APIs for one particular functionality on a given platform, like in Loadrunner or Jmeter we can run multiple scripts together or in parallel either using thread group in Jmeter or Controller in Loadrunner. Is it the same possible on Locust??

3 Answers

Yes, just import your User classes into a "combination locustfile"!

Lets say your users are called User1/User2 and is defined in files called user1.py/user2.py

Then you can define a third file called, for example, user1_plus_user2.py with the following content:

from user1 import User1
from user2 import User2

And then launch it using locust -f user1_plus_user2.py

You can also adjust their weighting from your combination file, by doing things like

User1.weight = 5
User2.weight = 1

No it's not. We achieved it by running pararell jenkins builds next to each other.

In Locust every test is group/scenario/case is represented by a Locust User. You could develop several Users with all the tests scripts that you need to run and execute all of them in a single parallel Locust run configuration.

Related