Jump to content


json parameters


  • Please log in to reply
3 replies to this topic

#1 Guest_brod_*

Guest_brod_*
  • Guests

Posted 11 January 2012 - 02:45 PM

I have a service that I am trying to test which takes JSOn via a POST and returns JSON. I am able to successfully record the POST however my attempts at changing the values using parameters have not worked. I edited the POST text and changed a value to $Var(UserName) and setup the parameter named something in the Response tab as being a random alpahanumeric string between 8 and 20 characters. When I run the tests the JSON get's posted however the $Var(UserName) comes through as blank. I also tried using url parameters and JSO Text parameters.

Can you please tell me the correct way to replace text in the posted json?

Attached Files



#2 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 665 posts

Posted 12 January 2012 - 05:07 AM

You can use a variable only in the following after initialization requests. If you want to use a variable in the first request you should create it in Initial variables of profile properties.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#3 Guest_brod_*

Guest_brod_*
  • Guests

Posted 12 January 2012 - 10:08 PM

Can you please give me an example on how to do that? I'm not sure that I understand. Would it be possible to change the file I uploaded so that it does what you are saying?

#4 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 665 posts

Posted 16 January 2012 - 07:08 AM

Can you please give me an example on how to do that? I'm not sure that I understand. Would it be possible to change the file I uploaded so that it does what you are saying?


I've attached an example.

Attached Files


Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users