Saturday, September 25, 2021

Rendezvous Point

Rendezvous point is used to force the Vusers to perform the simultaneous task during the test execution. It generates intense user load on the server for a particular functionality/page and instructs LoadRunner to measure server performance under such situation. Rendezvous point instructs Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task.
Let’s try to understand Rendezvous Point with an example:
Suppose you want to measure how an online shopping portal application performs when five Vusers submit the order of a product simultaneously. To emulate the required user load on the server, you instruct all the Vusers to halt before ‘Submit Order’ transaction. Once all five Vusers arrived, LoadRunner will release them simultaneously i.e. exactly at the same time.
 How to insert Rendezvous point in the LoadRunner script?
There are two ways to add Rendezvous Point in the script:
1. Insert during the script recording:
The recording bar of VuGen has an option to insert rendezvous point while recording the script. Its icon is like 4 arrows headed each other. If you hover the mouse over the icon then you can see ‘Insert Rendezvous’ text. You can click the icon and VuGen will insert Rendezvous point between recorded and being recorded steps.

Figure 02: Recording Bar
2. Insert after the script recording: 
In case you forgot to add Rendezvous Point during recording still you have another option to add it later. You need to right-click in the script where you want to insert rendezvous point, then either hover ‘Insert’ and click ‘Rendezvous’ (Refer to below Figure 03)

Figure 03: Insertion of Rendezvous Point
or in the VuGen menu Select Design > Insert in Script > Rendezvous (Refer to below Figure 04)
Figure 04: Insertion of Rendezvous Point

Rendezvous policy
The additional part of the rendezvous point in LoadRunner is rendezvous policy. You can set a rendezvous policy according to which the controller releases the Vusers from the rendezvous point either when the required number of Vusers arrives, or when a specified amount of time has passed.

Difference between Rendezvous Point and Rendezvous Policy
Rendezvous Point is defined in the VuGen (Test script) whereas Rendezvous Policy is defined in the controller (Test scenario)
Rendezvous Point instructs to LoadRunner ‘Where to stop the Vusers?’. On the other hand, Rendezvous Policy instructs to LoadRunner ‘How to release the Vusers?’
Importance of Rendezvous Policy:
Let’s say you have inserted a rendezvous point and as per definition, all Vusers have to wait until the last one arrives. Due to some issues, the last Vuser did not reach to the rendezvous point and all Vusers halted for a long duration, waiting for stuck Vuser. This will spoil the purpose of the test. To avoid such situation Rendezvous policy is used. Rendezvous policy helps to keep running the test by meeting the provided condition.
How to add Rendezvous policy in a LoadRunner scenario?
Rendezvous points are only effective for group mode with the manual scenario. It is disabled for a goal-oriented scenario. When you add a Vuser group or script to the scenario, LoadRunner scans the included scripts for rendezvous points and adds them to a central list of rendezvous points. In the controller, you have to
1. Select Scenario (Design) > Rendezvous to view this list.

 Figure 01
2. Click “Rendezvous…”

Figure 02
3. Click “Policy…”

Figure 03
4. Choose any one option as per your requirement and click ‘OK’

Policies:
Release when XXX % of all Vusers arrive at the rendezvous: Let’s say I have 100 Vusers; 20 are in downstate, 20 are in ready and 60 are in run state and I want to release 40% (=40 Vusers) after waiting them for 30 seconds, so I will give 40 as a value in the box.
Release when XXX % of all running Vusers arrive at the rendezvous: Let’s say I have 100 Vusers; 20 are in downstate, 20 are in ready and 60 are in run state and I want to release 40% of running Vusers(=24 Vusers) after waiting them for 30 seconds, so I will give 24 as a value in the box.
Release when XXX Vusers arrive at the rendezvous: Let’s say I have 100 Vusers; 20 are in downstate, 20 are in ready and 60 are in run state and I want to release 60 Vusers after waiting them for 30 seconds so I will give 60 as a value in the box.
Timeout between Vusers YY Sec.: The time the controller waits before releasing Vusers from a rendezvous.
Note:
Rendezvous points are only effective for group mode; not for percentage mode
In goal-oriented scenarios, a script’s rendezvous points are disabled.
Do not insert Rendezvous point inside a transaction.
The Vuser count or percentage in rendezvous policy should be given considerably high so that proper load can be generated on the server and meet the purpose.
The lr_rendezvous_ex function creates a rendezvous point in a Vuser script. When this statement is executed, the Vusers stop and wait for permission to continue.
The default timeout is 30 sec. The timeout is set in the scenario policy in the Controller.
This function can only be used in an action section, and not  in vuser_init or vuser_end 

The difference between lr_rendezvous_ex  and lr_rendezvous is 
lr_rendezvous does not return a range of values.
lr_rendezvous  function always returns zero.
lr_rendezvous_ex  function returns one of the values described in the table below
The return values of the lr_rendezvous_ex function are defined in the Lrun.h file. On Linux platforms, the function returns 0 for success and -1 for an illegal name. On PC platforms, the function returns one of the values described in the table below:


int rend_status; 
if ((rend_status= lr_rendezvous_ex("Meeting")) != LR_REND_ALL_ARRIVED) lr_output_message("rendezvous unsuccessful %d", rend_status); 
else 
lr_output_message("rendezvous successful %d", rend_status);

Q22. What Is Rendezvous Point? When The Rendezvous Point Is Insert?
Answer : To emulate peak load on the server.
 When multiple vuser to perform tasks at exactly the same time then insert the rendezvous point to emulate the peak load on the server.
 You insert rendezvous points into Vuser scripts to emulate heavy user load on the server. Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.
Q313. I wanna know the response time for a page with 1000 simultaneous users. What is your approach?
Answer: Insert the rendezvous point in the script on the above the targeted request and enable rendezvous point in the controller with targeted no. of uses. After that if we executed the test . The test result will give the response time .

No comments:

Post a Comment

Thread

Native Thread Demon Thread Non-Demon Thread Native Thread: - Any Method/Thread which is mapped to OS is called Native Thread or Method. Demo...