You’re heading down a well worn path. Take a look at the Virtual Table Server on disc two of your LoadRunner media.
--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en
--
Sorry, even if you write it to a file you will not be able to use it as a parameter for another virtual user using the standard parameterization engine. Why? Because when the virtual user starts it loads the data file into RAM. Even if you modify it on the disk you will not see the new values until the next test. You need a broker to move the values from one user to another. This is why the virtual table server was born. If you want a different path there is another options which uses MySQL as a queuing mechanism developed by some guys over in Australia. Query Google for “LoadRunner MYSQL VTS” and you should wind up in the right place.
James Pulley, http://www.loadrunnerbythehour.com/PricingMatrix
Cultivate your ‘architectural eye’
--
If you intend to use the data for another test, then you should be OK. But within the context of the same test you would most likely be hosed unless you go with a brokered passing of the data from one VU to another.
--
![]() Get this print framed for your wall! |
With VTS, several load generators can obtain values from a single common pool of values. One Vuser can create key values (such as a new customer ID), and any number of other Vusers can immediately use that value.
Sure, a Vuser can make requests to obtain values, but that may impose a different load profile that may not be realistic.
Without VTS, a single Vuser can only act on values it creates. As of LR8.0 and 9.10, LoadRunner is limited to having each load generator refer to its own parameter files, which means the same static values are used by multiple load generators. VTS provides a way for load generators to communicate with each other in real time.
If the script "marks" each value as being used, VTS provides a mechanism for allocating unique values among load generators.
If the script is written to act according to data obtained from VTS, the behavior of load generators can be controlled in real time.
An alternative to VTS is making calls to a MySQL C API dll and this VuGen code. But beware that call dll's is not thread safe, which requires running as a process rather than thread and thus drastically reducing the number of Vusers which can be run from each load generator machine.
Your use hinges on when items get loaded into memory for group two and whether you can modify the data file(s) for group two with the output of group one within the same test before the data files are loaded into RAM. You make the assumption that the data files are not loaded until the group is initialized. I would not make such an assumption without a direct observable test result to confirm such a hypothesis.
As you are operating within the context of a singular scenario your safest option would be to make use of the Virtual Table Server, or another broker, for passing the information between virtual users. If you were to be operating in two completely decoupled scenarios, with the execution for scenario two completely independent of scenario one, then you would most likely be safe in the option of having virtual users in scenario one write to data files for users which are a part of scenario two. Keep in mind you will still need to manage the locking issues associated with multiple processes attempting to access a single file where only one can have exclusive lock for update/write at a time. This is a non-trivial task and I would still recommend the VTS if you do not have experiencing in managing/programming for such semaphore locking situations. You can always export the data from VTS into a file if the scenarios remain decoupled.
James Pulley, http://www.loadrunnerbythehour.com/PricingMatrix
From: lr-loa...@googlegroups.com [mailto:lr-loa...@googlegroups.com] On Behalf Of isha isha
Sent: Tuesday, February 08, 2011 2:39 AM
To: lr-loa...@googlegroups.com
Subject: Re: capture the dynamic values in a file
Hi Chaitanya,
Ok I will make it more clear:
1. I recorded two scripts.
2. In first some value is created dynamically
3. I need to use the same value in the second script.
4. In LR Scenario , I will make 2 groups - 1st group will execute and save all the values generated by different users in a file - and then I need to call the same file for the 2nd group which will execute after the 1st group finishes.
Is there any function in Loadrunner or any method where I can execute this kind of scenario.
Regards.
On Fri, Feb 4, 2011 at 11:48 PM, Ruslan Kholyavkin <rkhol...@gmail.com> wrote:
Virtual Table Server (VTS)
The Virtual Table Server (VTS) Windows service maintains a virtual (in-memory) database accessible by several load generators on a network.
Error! Filename not specified.With VTS, several load generators can obtain values from a single common pool of values. One Vuser can create key values (such as a new customer ID), and any number of other Vusers can immediately use that value.
In fifteen years I think I have had to use VTS once. Very other time I
pre-staged enough data at the points of production for consumption
during the test.
'Pulley
I've used VTS twice - once to produce data for later consumption(!),
once because a tools vendor required it's use.
And in the latter case using VTS was understandable only because
loadrunner's rendezvous functionality didn't quite cover what was
needed. (And even then, the implementation of it was ugly as sin and
broken beyond belief..)
Next time I have a need that it might cover I'll probably use MySQL instead.
Regards,
Floris
---
'Many people asked me if I was afraid to fly and implied that I should
have stayed home, close to family and friends. I replied that if I had
stayed home, the terrorists would have won.
Unfortunately, my government does not agree with my definition of
winning. They think that living in fear and trying desperately to keep
us all 100% safe while flying is the most effective way to fight
terrorism. It reminds me of a boss that told me he liked it when
people lived in fear of being fired, they worked harder. I told him
being fired held no fear for me. When you live in fear, you do
irrational things - like sending millions of people's shoes through an
xray scanner every day.'
-- Stormy Peters