howardosborne / locust_for_jmeter_users

A tutorial on using Locust for people familiar with JMeter
MIT License
6 stars 0 forks source link

Throughput controllers concept missing in locust #3

Open SureshDamodaranTR opened 3 years ago

SureshDamodaranTR commented 3 years ago

In a workflow model, where we are interacting with multiple modules. In this model, 10% of users would be working with module A, 25% of users would be working with module B, 15% of users with module C. Can we do this distribution of users among the tasks or modules in Locust.

howardosborne commented 3 years ago

Hi,

A way that could work well for you is to create a separate class for each workflow use the weight attribute to skew more users to each workflow in the proportions you want. Alternatively you could put each workflow in a task and apply a weight to that instead. Have a look here and see how you get on.

https://docs.locust.io/en/stable/writing-a-locustfile.html#weight-attribute