Forums Register Login

increment a soap request's element for load test

+Pie Number of slices to send: Send
Hi all,

I've got a sample request like this :

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:imp="http://impls.www.aayush.com" xmlns:xsd="http://aayush.com/xsd">
<soap:Header/>
<soap:Body>
<imp:createCustomer>
<!--Optional:-->
<imp:request>
<!--Optional:-->
<xsd:custref>LoadTest1</xsd:custref>
</imp:request>
</imp:createCustomer>
</soap:Body>
</soap:Envelope>

Now I want to run a load test on this request using a different custRef everytime (this custRef is stored in a database so cannot be the same). How can i increment 'custRef' after every step so that the value is LoadTest1, LoadTest2, LoadTest3 etc??

Thanks in advance.
+Pie Number of slices to send: Send
You can add groovy script step to generate this.
+Pie Number of slices to send: Send
Thanks Ravinderjit for the reply.

But i couldn't understand how to transfer the properties through groovy script.

I tried to add the inline script ${System.currentTimeMillis()} in the custRef element but it send "" (blank string) in the request...
+Pie Number of slices to send: Send
This is what you should add in your groovy script.


Then add step 'Property Transfer' where you can easily transfer the result of groovy script to next step's request.
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 706 times.
Similar Threads
Where Do I Find Mikalai Zaikin's mock test
How to pass complex type parameter in web service while creating it through SAAJ
WSDL2JAVA Namespace Issue
SOAP Message Construction
Send SOAP Request to wsdl
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:36:08.