UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Absent Member.
Absent Member.
5171 views

LoadRunner 11.52 - VuGen - RunTime Data

Jump to solution

hi,

 

Is there a way to save the RunTime Data to a file. If we are running the script for more number of iterations like 15, we will be able to see only the values for the last iteration in runtime data tab after the script finishes. The data captured for the previous iterations will be over written. So is there a way to save the runtime data to a file, which will contain the values captured for each iteration.

 

Regards,

Madhu Gandhi.

0 Likes
1 Solution

Accepted Solutions
Absent Member.. Absent Member..
Absent Member..

Either you can use the VTS to capture the data or use a flat file to write  it.

 

For second option here are high level steps 

 

1.Create a flat file on a path where you script can access.

2.Open the file from vugen script in append mode.

3.Capture the data you want to capture through parameter.

4.Write the parameter to flat file

 

at the end you have all data you needed. Here is a sample code 

 

char *FileName = "filepath\filename.txt";

int iDocLength;
long DocFileOpen;

iDocLength = strlenlr_eval_string("{paramname}") ) + 1;
            //write the quote number in to a flat file
             DocFileOpen = fopen( BillDocFileName,"a+" );

            if(BillDocFileOpen == NULL){
                lr_log_message("Unable to open and write in doc file");
            }else
                fwritelr_eval_string("\n{gettingBillDocNo}"),iDocLength,1,DocFileOpen );

Thanks
Deb

View solution in original post

0 Likes
7 Replies
Absent Member.. Absent Member..
Absent Member..
Hello Madhu

there are few ways to accomplish this, in the below article you can find one of the easiest, try and let us know if this works for you, if not then I think I can provide few more ways to do it

http://support.openview.hp.com/selfsolve/document/KM200003

regards
0 Likes
Absent Member.
Absent Member.

Hi Editus,

I am not having access to this page. When I click on the url, it say "sorry, access denied".

 

Regards,

Madhu Gandhi.

0 Likes
Vice Admiral
Vice Admiral

Save the value to a parameter for future use

When you record the save_text function, it defines a parameter in the Parameter properties window and specifies it as a variable. In order to save the value of this parameter to a file, modify this parameter in the Parameter properties window and change it to be read from a file. Next time when you replay the script, the value from the status bar will be captured and saved to the file.

0 Likes
Commodore
Commodore

1. Open the file in Append mode 'a' so that the data won;t get overwritten.

2. Use VTS which is a very good option to save the run time data.

 

Thanks, Ajay

0 Likes
Absent Member.
Absent Member.

Hi all,

Thanks for the suggestions, but really sorry I am not able to do it. Please explain more elaborate with steps so that I will be able to implement the ideas.

 

Regards.

0 Likes
Absent Member.. Absent Member..
Absent Member..

Either you can use the VTS to capture the data or use a flat file to write  it.

 

For second option here are high level steps 

 

1.Create a flat file on a path where you script can access.

2.Open the file from vugen script in append mode.

3.Capture the data you want to capture through parameter.

4.Write the parameter to flat file

 

at the end you have all data you needed. Here is a sample code 

 

char *FileName = "filepath\filename.txt";

int iDocLength;
long DocFileOpen;

iDocLength = strlenlr_eval_string("{paramname}") ) + 1;
            //write the quote number in to a flat file
             DocFileOpen = fopen( BillDocFileName,"a+" );

            if(BillDocFileOpen == NULL){
                lr_log_message("Unable to open and write in doc file");
            }else
                fwritelr_eval_string("\n{gettingBillDocNo}"),iDocLength,1,DocFileOpen );

Thanks
Deb

View solution in original post

0 Likes
Absent Member.
Absent Member.

Hello!

 

Another idea can be to configure the run time setting for logging to "Extended Log" and "Parameter Substitution". After you have executed the script have a look to the replay log and find the lines with "Notify: Saving Parameter". This will show you the names and values of the parameters.

 

Regards

Thomas

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.