loadrunner 12.53- Json file parameter value not changing?

315 views
Skip to first unread message

sandy reyan

unread,
Jul 26, 2017, 3:43:15 PM7/26/17
to LoadRunner

Loadrunner : 12.53


Am preparing REST API script in LoadRunner with a long request and I created a json file and called it inside BodyFilePath, but while doing parameterisation, it's not changing value in the JSON file uploaded in Extra Files location in LR. How to resolve it?

 

Paramere name :

NewParam_1 given value is 28

x.Json file Sample Request:

        "age":"{NewParam_1}", 
        "model": null,

 

response:


Action.c(1): \t\t"age":"{NewParam_1}",\r\n
Action.c(2): \t\t"model": null,

Issue :

while passing the parameter value in the .json file request, value is not passing it.

Please guide me if you have a solution, awaiting your valuable response

Gerrie Holtzhausen

unread,
Jul 27, 2017, 8:06:17 AM7/27/17
to LR-Loa...@googlegroups.com
Hi 

I performed the same scenario.
I had to create multiple.json file instances under global files.
Did you add the .json extension?
You can also do this after adding the file to your script. In VuGen, select Tools > Options > Scripting > Script Management and add the .json extension to the Allowed Extensions list. 

Thanks
Gerrie
--
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-LoadRunner+unsubscribe@googlegroups.com.
To post to this group, send email to LR-Loa...@googlegroups.com.
Visit this group at https://groups.google.com/group/LR-LoadRunner.
To view this discussion on the web visit https://groups.google.com/d/msgid/LR-LoadRunner/153c4a8c-2c7f-403d-ac26-9d79be782fa8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Regards
Gerrie Holtzhausen
Cell 0780463075

Gerrie Holtzhausen

unread,
Jul 27, 2017, 8:06:17 AM7/27/17
to LR-Loa...@googlegroups.com
Also refer to the below




On Wednesday, July 26, 2017, sandy reyan <sandyt...@gmail.com> wrote:
--
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-LoadRunner+unsubscribe@googlegroups.com.
To post to this group, send email to LR-Loa...@googlegroups.com.
Visit this group at https://groups.google.com/group/LR-LoadRunner.
To view this discussion on the web visit https://groups.google.com/d/msgid/LR-LoadRunner/153c4a8c-2c7f-403d-ac26-9d79be782fa8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark T

unread,
Jul 28, 2017, 9:49:15 AM7/28/17
to LoadRunner
Files passed in via BodyFilePath are not processed for parameter substitution. We have a read loop that reads each line of the file, processes the line for parameter substitution using lr_eval_string, and builds a scratch file for passing as BodyFilePath. This method will slow down the throughput of messaging, you will have to determine how many additional vusers you will need to achieve the message throughput rate you need for testing the service. 

Jayesh Solanki

unread,
Jul 28, 2017, 9:49:17 AM7/28/17
to LR-Loa...@googlegroups.com
Just replace default curly brackets { } delimiter with any other parameter delimiter.....Because json body pass in curly brackets.

Tool -->options --> Scripting --> Parameters 

Hope it will work.

Thanks,
Jayesh


For more options, visit https://groups.google.com/d/optout.



--
Thanks&Regards
Jayesh Singh Solanki
Reply all
Reply to author
Forward
0 new messages