Highlighted
New Member.
1109 views

FILE HANDLING IN PERFORMANCE CENTER

Hi All

I am trying to store correlated value in a file while executing the script in Performance Center.

Can somebody tell me how to do that.

I know the code for file writng in the Load Generator.

0 Likes
6 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: FILE HANDLING IN PERFORMANCE CENTER

Hi,

Are you trying to store a correlated value to a file in the script for later use in subsquent test runs?

Thanks,

Shlomi

0 Likes
Highlighted
New Member.

Re: FILE HANDLING IN PERFORMANCE CENTER

Yes, i am trying to save correlated values into a file while running script.

I got successful result while executing in LoadRunner(VUGen).

But i dont know how to execute, script and saving the correlated values into a file, in PERFORMANCE CENTER.

Kindly Help me in this regard.

Thanks 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: FILE HANDLING IN PERFORMANCE CENTER

Hi,

When you do that locally on VuGen machine the original script copy will be updated, but when you will trying doing so from LoadRunner Controller or Performnance Center when the script runs on a remotely Load Generator it is a different story.

I suggest using Virtual Table Server for managing this data. You can read about it in this blog post: /t5/LoadRunner-and-Performance/The-New-Virtual-Table-Server-VTS-in-LoadRunner-11-52/ba-p/6069435

Regards,

Shlomi

0 Likes
Highlighted
New Member.

Re: FILE HANDLING IN PERFORMANCE CENTER

Hi,

I read the blog from the link you posted,  but it is for loadrunner not for performance center.

So, if you can provide any other solution or example related to the issue, that would be very helpful.

 

Thanks

Anupam

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: FILE HANDLING IN PERFORMANCE CENTER

Hi,

It works in the same way for Performance Center.

Regards,

Shlomi

 

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: FILE HANDLING IN PERFORMANCE CENTER

Hi ,

Yes you can implement it using the below code.

Let us consider that {c_CaseId} is the dynamic value already correlated in the some of the requests

We have to take that particular {c_CaseId} (which is need to put it into into file) function as shown below

 writeCaseIdFile(lr_eval_string(“{c_ CaseId}”)); //called function -- which is placed in the Action file of the LoadRunner

 Need to pass a parameter to the file to write into the file ( need to write this file operation in global.h): 

Void writeCaseIdFile(char *CaseID) //calling the function

{

Long file_stream;

Char *filename=”c:\\20A_A.txt”;

//open the file with read access

If((file_stream=fopen(filename,”a+”))==NULL)

{

lr_error_message(“cannot open file %s”,filename);

}

fprintf(file_stream,”\n%s”,CaseID);

//close the filestream

If(flcose(file_stream))

lr_error_message(“Error occurred while closing file %s”,filename);

}

#end if

 

0 Likes
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.