Highlighted
Visitor.
276 views

Retrive correlated values

How can we store/ retrive correlated value while creating new account in HP performance center and can we write these values into a file? Please reply asap

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Retrive correlated values

Hi

I think that you need to describe more what you are trying to do.

Are you trying to performace test  Performance Center, and creating users there?

 

If you have a value correlated or not, and want to write it to a file, then just open a file and write to it.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

.
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: Retrive correlated values

Hi Anup,

Yes we can write the correlated values into the file using following code (using file operations)

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

We have to take that particular {c_CorrelationId} (which is dynamic value of the script) into file function as shown below (need to place the function after capturing the dynamic value)

 writeCaseIdFile(lr_eval_string(“{c_ CorrelationId}”)); //called function

 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 *CorrelationId) //calling the function

{

Long file_stream;

Char *filename=”c:\\FileCapture.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”,CorrelationId);

//close the filestream

If(flcose(file_stream))

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

}

#end if

Note: This will help you to solve the requirement.

Thanks,

Surya Kosuri

 

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.