Unable to parameterization for the data under extra file

37 views
Skip to first unread message

iet.ami...@gmail.com

unread,
Feb 9, 2015, 5:56:08 AM2/9/15
to LR-Loa...@googlegroups.com

Hi,

I am using LR 11.5 to do Post Rest API testing .

I added the Body(Payload) in extra file called xyz.json and below is my script look like. (actual URL is changed). when I run below script its works fine if the data in the extra json file is not parameterized. As soon as I parameterized scripts fails (Not changing parameter name to any value ). Kindly help How can I do parameterization in to extra files which added to LR.

   web_custom_request("TestAPI",
"URL=https:XYZ.com-Subscriptio_key?12332",
"Method=POST",
        "Resource=0",
        "RecContentType=application/json",
        "Referer=",
        "Snapshot=t16.inf",
        "Mode=HTML",
      "BodyFilePath=xyz.json", LAST);

Note :XYZ.json is extra file added with Json data body into LR script.

Thanks
Amit

Gaurav

unread,
Feb 9, 2015, 11:35:43 PM2/9/15
to LR-Loa...@googlegroups.com
Hi Amit,

If I understand your question correctly, you are adding xyz.json request inside web_custom_request captured code during recording. But just imagine, how would LR know the different between any other regular string and xyz.json. So whenever we do parametrization, parenthesis brackets ({ }) are added to that parameter name. You can search for LR parametrization keyword in youtube, there would be great videos which will demo properly in both audio, video. Best luck.

Thanks,
Gaurav

Abhishek Banginwar

unread,
Feb 10, 2015, 9:24:07 AM2/10/15
to LR-Loa...@googlegroups.com

How are you parameterizing the request?

--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
To post to this group, send email to LR-Loa...@googlegroups.com.
Visit this group at http://groups.google.com/group/LR-LoadRunner.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages