Quantcast
Channel: All LoadRunner Practitioners Forum posts
Viewing all articles
Browse latest Browse all 12134

Getting Error while Parameterizing the .json script

$
0
0

Hi,

 

I am using the "bodyfilepath" method to call the .json file to run the web service request. Here as i need to run for load test, i am in need to parameterize the .json script. In LR i am allowed to do parameterize but getting error while running the script. If i run without the parameterization then the script runs sucessfully. Kindly find the below code for your reference.

 

Action script:

 

 

Action()
{
         
    lr_start_transaction("getcustomeraddress");
    web_custom_request("getCustomerAddress",
          "URL=https://pre-prod-skpservicesinternal.nus.ironmountain.com/rmservices/api/recordsMgmt/manageCustomers",
          "Method=POST",
          "Resource=0",
          "EncType=application/json",
          "Mode=HTTP",
          "BodyFilePath=getcustomeraddress.json",LAST);
    lr_end_transaction("getcustomeraddress",LR_AUTO);
      
    return 0;
}

 

.Json Script;

{
    "method": "getCustomerAddress",
    "format": "application/json",
    "system": "amer",
    "companyId": "1234",
    "customerId": "{custid}" ,
    "filter": 
    {
    "addressCode": "{addrcode}"
    }
}

 

Please help me in this regard. 

Thanks in Advance.


Viewing all articles
Browse latest Browse all 12134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>