Highlighted
Contributor.
Contributor.
2071 views

How to parameter date and time in LoadRunner 12.53?

Dear Experts,

I have captured Json response in LR script contain date and time need to correlate, so that it change each replay. As the response is not from server, web_reg_save_param_ex function is not working for this. 

Json in my script:

"responseHeaderTimeDateObject\":\"2017-12-19T15:21:01..000Z\",\"usrSubmitTime\":\"2017-12-19T15:20:54.969Z\",\"usrSubmitTimeUsingStopWatch\":\"2017-12-19T15:20:55.000Z\",\"requestStart\":\"2017-12-19T15:20:55.582Z\",\"requestEnd\":\"2017-12-19T15:21:01.613Z\",\"requestTime\":6031,\"stopWatchTime\":6000

Any solution will be highly appreciated. It is high priority for me.

 

0 Likes
4 Replies
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: How to parameter date and time in LoadRunner 12.53?

Not sure what you meant that the response is not coming from a server but if it is saved in some string you can use 

lr_save_param_regexp or similar commands to save it into a parameter

0 Likes
Highlighted
Contributor.
Contributor.

Re: How to parameter date and time in LoadRunner 12.53?

Hi, BorisKozo2 

Thank you for quick reply. We are actually capturing client time and travel time when uploading document in the system. I implemented attached web_reg_save_param_regexp. Found the error:

"Error -35049: No match found for the requested parameter "JsonRes". Check whether the requested regular expression exists in the response data". I am having hard time to figure out the regular expressions... Thank you once again and please feel free for further clarification regarding my issue.

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: How to parameter date and time in LoadRunner 12.53?

hi,

 

you can use https://www.debuggex.com/ for building the regular expression (make sure to use PCRE engine).

 

also, you can check http://regexlib.com/Search.aspx if there is a known regexp for your needs.

Micro Focus Performance Core.
Functional Architect
your performance, our passion!
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: How to parameter date and time in LoadRunner 12.53?

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.