date format functions in loadrunner

619 views
Skip to first unread message

Bala

unread,
Feb 14, 2011, 12:28:48 PM2/14/11
to LoadRunner
How to add c libraries in loadrunner.

I'm trying to do date format using c in the loadrunner.

Please check whether it is correct or not.

int day;
int month[5];
char *datechange;
int year;
scanf(dateChange, "%d %d %d", &day, month, &year);
printf(dateChange, "%d-%s-%d", day, month, year);
printf(dateChange, "%d-%d-%d", day, month, year);

lr_message("The new date format is %s", dateChange);

James Pulley

unread,
Feb 14, 2011, 12:40:23 PM2/14/11
to lr-loa...@googlegroups.com
1)see your loadrunner \include directory.
Additional information
1a) http://www.c-for-dummies.com/
1b) http://www.cs.virginia.edu/~lcc-win32/

2)see header file lrun.h. You may find some interesting items within here
related to date and time formats.

3)Where are you scanning from? A virtual user is not typically an
interactive console device. Can you imagine 100's of virtual users waiting
for a keystroke to continue? You may need to rethink your approach.

James Pulley, http://www.loadrunnerbythehour.com/PricingMatrix

--
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

Kevyland

unread,
Feb 14, 2011, 5:01:07 PM2/14/11
to LoadRunner
Is lr_save_datetime(); function a possible function to use here?

venkat kumar

unread,
Feb 15, 2011, 3:01:51 AM2/15/11
to lr-loa...@googlegroups.com, sadan kumar
Hi,
 
Please use the date parameter file option.
 
Thanks,
Venkat

Richard Bishop

unread,
Feb 15, 2011, 2:27:06 AM2/15/11
to LoadRunner
Don't worry about C libraries. Here are some sample
Date/time functions that should help.
http://www.bish.co.uk/index.php?option=com_content&view=article&id=78

Richard Bishop

unread,
Feb 15, 2011, 2:45:09 AM2/15/11
to LoadRunner

Richard Bishop

unread,
Feb 15, 2011, 2:25:04 AM2/15/11
to LoadRunner
I'm not sure that you need to worry about C libraries.
Here's an article that I wrote about date/time functions in
LoadRunner.

http://www.bish.co.uk/index.php?option=com_content&view=article&id=78

All the best
Richard



On Feb 14, 5:28 pm, Bala <gebalam...@gmail.com> wrote:

Rao Gadde

unread,
Feb 15, 2011, 11:18:20 AM2/15/11
to lr-loa...@googlegroups.com
iam seeing the Following error when keeping the user id in the parameter table as "Unique"
 
Insufficient records for parameter 'userid' in table to provide the Vuser with unique data  ..

when i keep sequential , i see all the Vusers are Picking the First user id..
 
How can i do to make the script pick different id's for different Vusers..
 
 
Thanks
 
 

laxmi narayana

unread,
Feb 15, 2011, 12:26:06 PM2/15/11
to lr-loa...@googlegroups.com
it seems u dont have enough data wrt to the number of Vusers you are testing...

Rao Gadde

unread,
Feb 15, 2011, 12:35:22 PM2/15/11
to lr-loa...@googlegroups.com
i have 10 user id's in the paramaeter data file and iam runnign the scenario for 10 Vusers..

Venkat P

unread,
Feb 15, 2011, 4:47:54 PM2/15/11
to lr-loa...@googlegroups.com
Unique > update value "Once" is what you are looking for

Rao Gadde

unread,
Feb 15, 2011, 5:39:52 PM2/15/11
to lr-loa...@googlegroups.com
Allocate Vusers values in the controller
 
automatically allocate block size..
 
where to use the above ones??

On Tue, Feb 15, 2011 at 5:22 PM, Rao Gadde <gadd...@gmail.com> wrote:
 
Unique > update value "Once" ---- This works if i know how many if the Vusers are less than or equal to user id''s.
 
once i reach the alloted number of  user id 's   iam seeing this error
 
Insufficient records for parameter 'userid' in table to provide the Vuser with unique data 
 
i dont know how many Vusers i need to reach my TPS.. i have only a limited 10 test id's.. how can i prevent from getting the error message if i need more vusers than user id's.

Rao Gadde

unread,
Feb 15, 2011, 5:22:13 PM2/15/11
to lr-loa...@googlegroups.com
 
Unique > update value "Once" ---- This works if i know how many if the Vusers are less than or equal to user id''s.
 
once i reach the alloted number of  user id 's   iam seeing this error
 
Insufficient records for parameter 'userid' in table to provide the Vuser with unique data 
 
i dont know how many Vusers i need to reach my TPS.. i have only a limited 10 test id's.. how can i prevent from getting the error message if i need more vusers than user id's.

On Tue, Feb 15, 2011 at 4:47 PM, Venkat P <vjp...@gmail.com> wrote:

Venkat P

unread,
Feb 16, 2011, 8:46:42 PM2/16/11
to lr-loa...@googlegroups.com
My car gives me 10 miles to a gallon. I have only two gallons of fuel with me. But I need to drive 100 miles to reach my destination. What would you say to me? "Get more fuel".   Can I go 100 miles with just two gallons? "Impossible"

So either I have to get more fuel, or get a car that gives me 50 miles to a gallon, or just drive less.

Same applies to your case. Lets look at the constraints.

You have only 10 user ids.
You can use them only uniquely (you cannot reuse them.)
You want to run more than 10 users. (to generate your required x amount of TPS)

One of the three conditions above will have to change to make things work.

-Venkat
Reply all
Reply to author
Forward
0 new messages