How to have Common Rendezvous point for 2 scripts

167 views
Skip to first unread message

sathish Ram

unread,
Jan 13, 2014, 8:36:50 AM1/13/14
to LR-Loa...@googlegroups.com

Please guide me, is it possible to achieve below business need - Load runner

We have 2 different scripts with same steps to update the cart for same user – User A (one with external user and other with customer agent). Now our business team needs to know what will happen both as external user and customer agent click on Update cart for the same user at same time.

My clarification - How to have common rendezvous point for both the scripts; where it has to wait and trigger Update cart transaction simultaneously in both the scripts

Thanks and Regards

Sathish Asokan

Mital Majmundar

unread,
Jan 15, 2014, 4:03:48 AM1/15/14
to LR-Loa...@googlegroups.com

Hello Sathish,

As per my understanding, we will not be able to simulate rendezvous point for 2 different scripts at the same time.
Is it possible to ask the business team to provide both the user roles for 1 particular user? If yes then u can simulate both the tasks in same script and hence imitate the business scenario as required.

--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Deepak Gupta

unread,
Jan 16, 2014, 3:13:47 AM1/16/14
to LR-Loa...@googlegroups.com
Satish,
 
I cant understand the logic of creating two vuser scripts if you have same steps in both scripts.
is it not possible to parameterize the username instead ?
 
Tx,
Deep

Pradhyumna Gupta

unread,
Jan 16, 2014, 4:23:50 AM1/16/14
to LR-Loa...@googlegroups.com

Depending on the type of user, does the business flow change?

If not then create 1 script and parameterize the usernames.

If yes, then there is no way to create rendezvous points for 2 different scripts.

James Pulley

unread,
Jan 16, 2014, 10:54:56 AM1/16/14
to LR-Loa...@googlegroups.com

If yes, then there is no way to create rendezvous points for 2 different scripts.”

This is factually incorrect information.  Please examine the examples and documentation related to rendezvous, the most often misunderstood and abused feature of any performance testing tool.   A resume which highlights rendezvous has a 95% correlation to a person who you do not want to hire.

sathish Ram

unread,
Jan 20, 2014, 3:45:48 AM1/20/14
to LR-Loa...@googlegroups.com, james....@jamespulley.com

Let me explain the scenario in more detail

Our application is online shopping where the customer they themselves can login to our online shopping website and they can add items and update the shopping cart. Also we have one more option where the customer calls customer care representatives and representatives will impersonate to our online shopping website with that customer profile details

Now our development team suspects; there is db blocking, For the same user, when simultaneously both external user and call center representatives tries to update the shopping cart at the same time either with same item or different item in the cart.

Note: For both external user and call center representative business flow; till certain point, steps (user navigation) will be different, after that adding item and clicking on Update button, steps will remain the same. Now for the above 2 different business flow, we need to have "Rendezvous" point for Update button

Please help me, as this in great need

James Pulley

unread,
Jan 20, 2014, 9:20:38 AM1/20/14
to LR-Loa...@googlegroups.com, james....@jamespulley.com
1)  Read the documentation on Rendezvous.  It's implementation and use are outlined very very well in both the Virtual User Generator Guide and the Controller Guide, both of which are installed ad PDF files when you install any component of Loadrunner
2)  No two people in the universe execute exactly the same action at the same time in a coordinated fashion even when they are on the phone together.  You are going to have half to 3/4 of a second of variance between the actions.   Don't take my word for it.  Examine the web HTTP access log files for when this action occurs today.  These logs are to the millisecond so it should be easy to track the actions of an agent and a customer both operating against the same cart. Use a tool like Splunk to search for the cart IDs across log files to check out the time stamps.      This means you will need to implement some sort of delay after the rendezvous on one or both sides representing the delay after "1-2-3-click".   Look to see what sleep(rand() * 776) would do for you.
3) As you are trying to correlate the actions of two, and precisely two, people working on the same cart at "nearly" the same time, you are going to need a dynamic rendezvous name to sync just two people.   This poses a problem because of how rendezvous policies are set in the controller on a fixed rendezvous name.   Instead you are more likely going to need something that is queue based to pass information between the two virtual users where one of them controls the rendezvous policy and there are queues setup individually for individual virtual users.   Consider something like RabbitMQ where when a virtual user of the user type starts it creates a distinct queue for itself and one for an agent, then it passes a message to a global queue for the agent process to pickup which has the queue name for the user queue embedded in the message.   This 1:1 queue setup can then be used as synchronization mechanism between the two users where you would setup a loop to check the queue every 250-500 milliseconds for a message that says "access the cart" where the opposite user posts the message and then sleeps for 250 milliseconds to allow the message to be delivered to sync the actions.

Pradhyumna Gupta

unread,
Jan 20, 2014, 10:03:45 AM1/20/14
to LR-Loa...@googlegroups.com
From what I have used till date, creating a rendezvous point for transactions from different scripts is not possible.

for eg.
Script 1 has transaction T1 and Script 2 has transaction T2.

I believe rendezvous point can be created for all users(or a subset) of Script 1 and same for Script 2. But as far as I know we cannot create a rendezvous point for T1 and T2(transactions from different script).

If it's possible I would like to know how to go about doing this.

sathish Ram

unread,
Jan 24, 2014, 3:04:59 AM1/24/14
to LR-Loa...@googlegroups.com

I did the below, please correct me if it’s wrong

Script 1 – Transaction 1, Transaction 2, Transaction 3

Script 2 – Transaction 2, Transaction 2, Transaction 3

In both Script 1 & Script 2; Transaction 1 & Transaction 2 are different user actions whereas Transaction 3 of both the scripts is of same user action. [Transaction 3 à Update Cart]

I adjusted “Think Time” for both the scripts and made the third transaction (update cart) almost start close to each other [transaction 3 of script 1 and script 3].

In both the scripts, I added common Rendezvous point [lr_rendezvous (“common”);] before the third transaction. Now when I open these 2 scripts in the controller, I am seeing one common rendezvous point linked to both the scripts.

I set the policy and I tried running with different timeouts in rendezvous policy.

I felt transaction3 in both the scripts wait for that rendezvous and got executed

For example I kept 100% running vusers as policy with 5 users in first script and 5 users in second script and gave run, when the first 5 users of script 1 arrived to the rendezvous point then it waits for the remaining 5 users of script 2 to arrive at the rendezvous point and then it’s getting released.

Is this way, can we have same common rendezvous point for 2 different scripts which has one unique transaction (user action steps)?

I did this, with trial and error method. Please let me know is this proper?

Thanks and Regards

Sathish Asokan


James Pulley

unread,
Jan 24, 2014, 11:08:37 AM1/24/14
to LR-Loa...@googlegroups.com
Now go to production and observe in the web request logs for the cart service exactly how close these requests are.   You will find that your rendezvous on "NOW!!!!!!!" is far closer than what you see in production.   You need to have a sleep delay after the commencement of the rendezvous appropriate to your observed user behavior.   Take advantage of Splunk or Logparser to process the timestamps on the same cart IDs to find out.

You need a correlating event for two specific people, an agent and a customer.  What you have done is set it for two groups of people and artificially constrained their behaviors for that all of the agents and all of the customers are operating in the same way at the same time.   Behaviorally this is not how users operate in production, for one agent may be at the beginning of a call while one is in the middle working on a cart with a customer when at the same time a third agent is finishing a call.   By making the behavior of all of the customers and agents synchronous in nature you are violating an actual user behavior pattern.   What you need is a synchronization pattern between two specific users, not between two groups of users.   So, while your rendezvous is implemented correctly in the tool, behaviorally you are way off the mark.

Abhishek Banginwar

unread,
Jan 26, 2014, 8:34:14 PM1/26/14
to LR-Loa...@googlegroups.com

Yes

-A

--

Farrel Mathew

unread,
Feb 1, 2014, 3:22:29 AM2/1/14
to LR-Loa...@googlegroups.com
Is programming logic of "UPDATE"cart in application code different for Customer and Call Center Executive ??
If not, you can simulate this DB block problem with any one of the script itself with rendezvous...

Correct me if i am wrong.


Reply all
Reply to author
Forward
0 new messages