Highlighted
Absent Member.
Absent Member.
185 views

Share users on controller

Hi All,

Please suggest for below mentioned case:

I have two database scripts (s1 & s2). When i load the two scripts in controller, i want to assign 20 users to both scripts (not 20 & 20 , but total 20). When I do this, the users are split as 10 for script 1 and 10 for script 1.

I want 20 users to be on these two script. These 20 users needs to share these script such that at a moment, the total number of numbers on both script do not exceed 20.

This is due to 2 constraints:
1. Maximum users not to exceed to for whole controller scenario
2. Per transaction in action, 20 users should hit it.

2 ways i could have thought are:
1.Concatenate two scrips and load as a single script( too many declaration error & efforts)
2.Try to concatenate the recording log of both scripts and regenerate the code .

Could anyone tell any specific scenario setting that could ease this out?

Thanks
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: Share users on controller

If i understand correctly, you want a total of 20 users running your two scripts. You don't care how they are divided as long as the sum of each script users is no more than 20. Correct?

If that's the case, I'd have to recommend creating a new script, leaving the first action blank and copying each of your original scripts in a different action.

I would then write a little C code in the first (empty) action to randomly run one of your 2 scripts. You can add a command on top of each action so that it displays which script is being run for each user in the controller.

I know you didn't want to merge your two scripts but, to my knowledge, this is the only solution to your request. Also, the extra work you'd have to do isn't all that great:
1. C code to randomize which script to use
2. Copying existing scripts into new actions
3. Add "lr_vuser_status_message" on top of each Action so the controller can let you know how many users are executing which script.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Share users on controller

Hi Anuj,
If you want all 20 users hit at same time, follow the solution given by "FCharbonneau" and define rendezvous point to bring all users at same point after selecting the action part.

If this doesn't solve, elaborate with some details.

Regards,
Surendra
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Share users on controller

HI Anuj,

Your requirment is to keep total 20 User load using 2 DB scripts.

I am expecting you have already created both the scripts seperately?

Lets assume your requirment like below table..

Script Time TotalTxn User Txn/Usr

Script1 60min 120 10 12
Script2 60min 120 10 12

Script3 60min 120 20 6

Here time is test duration, Totaltxn is the amount of txn expected from each script, # of users and txn/user.

Sol 1.

In scenario use both the scripts with individual load of 10 users each. Your both objective will achive here. During entire test duration ( exclude rampup and rampdown) users load will be 20 on DB and 20 transactions in total will happend.

Sol 2.

If you want only one script then instead of doing a copy paste.. Import the existing script into a new script using Action-->Import Action into Vuser

LR Vugen will automatically take care all the paramitrization and correlation stuff.

Now you will have 2 action functions in your script. In RTS schedule it either by using BLOCK to select the each function as a random basics or as a sequential basics.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.