Best strategy for switching between types of users
Let's say I have a setup with 3 distinct types of users. Light, Medium, Heavy. Each one has different values for two paramters.
I have X number of threads and I want let's say 60% to be Light users, 30% to be Medium users and 10% to be Heavy users.
What would be the best strategy for this? I have looked into User Parameter but from what I see that would mean that it's always a 33% - 33% - 33% split.
Is there an alternative to using some sort of random variable/switch type combination? I keep feeling like I'm completely abusing the User Variable element in a way that it wasn't supposed to be.
(what I'm looking for is something along the lines of.
usertype=light: threshold1 = light_treshold1_value; threshold2 = light_treshold2_value;
usertype=medium: threshold1 = medium_treshold1_value; threshold2 = medium_treshold2_value;
usertype=heavy: threshold1 = heavy_treshold1_value; threshold2 = heavy_treshold2_value;
And then do something using threshold1 and threshold2)
Re: Best strategy for switching between types of users
Are the user definitions of Light/Med/Heavy defined by login ID, or only by values for the parameters?
If by ID, the simplest solution is to have a CSV file with your IDs, and control the ratios that way.
If by parameters, you could write a beanshell script that generates the values of the parameters based on your desired ratios.
Alternately, you can use the function threadNum in conjunction with an IF logic controller, wherein the logic would be "If x < threadnum < y then designate user as type Z", where x and y represent percentage of users. IF controllers allow variables as part of logic declaration.