I am using the 'SOAP/XML-RPC Request' sampler to test a B2B server that must
see a unique XML purchase order number each time. A snippet of the XML looks
like this:
-------------------------------------------
<Order>
<OrderHeader>
<OrderNumber>
<BuyerOrderNumber>UNIQUE_PO_NUMBER...
-------------------------------------------
I tried to use the __counter function to generate a unique PO number. The
user manual says a Config element field can be used for this:
-------------------------------------------
"Built-in functions can be written into any field of non-controller test
components. This includes Samplers, Timers, Listeners, Modifiers,
Assertions, and Config Elements."
http://jakarta.apache.org/jmeter/usermanual/functions.html
-------------------------------------------
My first attempts were to use Config elements (e.g.: 'User Defined
Variables') to initialize a counter.
Creating entries with name and/or values set to:
${__counter(FALSE,ctr)}
did not work - ${ctr} stayed unsubstituted.
It finally worked when I used the __counter function directly in the XML-RPC
sampler's data section like below:
-------------------------------------------
<Order>
<OrderHeader>
<OrderNumber>
<BuyerOrderNumber>${__counter(FALSE,ctr)}...
-------------------------------------------
Once the XML-RPC sampler got executed, I could then refer to ${ctr}
elsewhere in the testplan.
I had a couple of questions and would love some feedback:
1. Can __counter�be initialized in a config element?
2. Can the XML I submitted in the 'SOAP/XML-RPC Request' sampler be loaded
up from a file? (ReadStringFromFile would
With regards,
Sonam Chauhan
--
Corporate Express Australia Ltd.
Phone: +61-2-9335-0725, Fax: 9335-0753, Email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]