WAPT Forum: json parameters - WAPT Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

json parameters

#1 User is offline   brod 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 11-January 12

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 File(s)


0

#2 User is offline   Sergei Leonov 

  • Advanced Member
  • PipPipPip
  • Group: Administrators
  • Posts: 413
  • Joined: 12-February 08

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
0

#3 User is offline   brod 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 11-January 12

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?
0

#4 User is offline   Sergei Leonov 

  • Advanced Member
  • PipPipPip
  • Group: Administrators
  • Posts: 413
  • Joined: 12-February 08

Posted 16 January 2012 - 07:08 AM

View Postbrod, on 12 January 2012 - 10:08 PM, said:

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 File(s)


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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users