WAPT Forum: Using variables inside "Post raw data" - WAPT Forum

Jump to content

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

Using variables inside "Post raw data"

#1 User is offline   WSOD 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 09-April 09

Posted 13 April 2009 - 05:54 PM

I am trying to use a variable in a Post. In the example below I need to cycle a series of tickers (500) to replace the GOOG. What would be the best way of doing this, without having to use a list file with the 500 unique post payloads?

Thanks

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetResponse xmlns="http://tempuri.org/"><pgInpt></pgInpt><req><wgt wID="40"><inpt><sym>GOOG</sym></inpt></wgt></req></GetResponse></soap:Body></soap:Envelope>

0

#2 User is offline   angela 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 373
  • Joined: 12-February 08
  • Gender:Female
  • Location:Novosibirsk

Posted 15 April 2009 - 10:39 AM

QUOTE (WSOD @ Apr 14 2009, 12:54 AM) <{POST_SNAPBACK}>
I am trying to use a variable in a Post. In the example below I need to cycle a series of tickers (500) to replace the GOOG. What would be the best way of doing this, without having to use a list file with the 500 unique post payloads?

Thanks

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetResponse xmlns="http://tempuri.org/"><pgInpt></pgInpt><req><wgt wID="40"><inpt><sym>GOOG</sym></inpt></wgt></req></GetResponse></soap:Body></soap:Envelope>


It is not obligatory to initialize a variable from a list, you can use another functions, for instance, $Seq. With the help of this function you can get a unique value for each user.

Angela Samsonova
Customer Support 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   WSOD 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 09-April 09

Posted 16 April 2009 - 03:10 PM

How do you insert the $Seq variable into the post data? I tried several differnt times, and was not able to get the variable to passed in.

So if this is my post data, how do you properly insert the variable? Also where where do you set the variable? In the attachement I am trying to add the $sym variable to the poast data like this:
Attached File  WAPT.jpg (49.39K)
Number of downloads: 16

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetResponse xmlns="http://tempuri.org/"><pgInpt></pgInpt><req><wgt wID="40"><inpt><sym>$Sym</sym></inpt></wgt></req></GetResponse></soap:Body></soap:Envelope>

but that does not work. Can you provide instructions on how to do this?
Thanks

QUOTE (angela @ Apr 15 2009, 04:39 AM) <{POST_SNAPBACK}>
It is not obligatory to initialize a variable from a list, you can use another functions, for instance, $Seq. With the help of this function you can get a unique value for each user.


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