how to set random choice and probabilities for transactions in Load Runner

StackOverflow https://stackoverflow.com/questions/20400554

  •  29-08-2022
  •  | 
  •  

سؤال

So, I have 5 types of main transactions (each type contains sub-transactions) in my script.

Action1()
{
lr_start_transaction("type1_transactions");
...
lr_end_transaction("type1_transactions",LR_AUTO);
return 0;
}

Action2()
{
lr_start_transaction("type2_transactions");
...
lr_end_transaction("type2_transactions",LR_AUTO);
return 0;
}

(and so on)

My goal is to randomize this 5 types with probabilities 30%, 30%, 30%, 5%, 5% in Load Runner.

Could you please advise me, what code should I add in my test script to realize this randomization?

هل كانت مفيدة؟

المحلول

open run time settings then go to run logic.Right click on run and click on properties, choose random then click OK. now you can change the percentages per each action by just double click on the particular action in run logic

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top