Hey, That sounds complicated. This is how I did it:
Problem - application requires lots of .xml documents for load test (more than I can generate prior to test, or even store for that matter) - I wanted to have access and modify dynamically the content sent in those xml Solution 1. use Soap XML/RPC Sampler instead of HTTP Request 2. paste the xml schema fields there 3. as content for those fields I used whatever I needed: variables that pass text generated in various random ways or timestamps or whatever fields were needed (some were configured from CSV Data Sets as well) 4. un-check "Send SOAP Action" => et voila, this works as POST action and it acts just as sending a post request using the HTTP Sampler, but it gives the flexibility of changing the content and viewing the document while editing the test plan in GUI mode. Limitations a. the default encoding with this sampler is UTF-8 (depends on SOAP I think), this can cause problems if you depend on the encoding b. I haven't figured out how to make a multi-part POST using this method, so if anyone can help I would much appreciate it. > If I couldn't make this work like this, I would have tried to send long strings as parameter in the HTTP Sampler (if you don't specify the name of the parameter, it will send just the string as post data, however, using that SOAP Sampler works smoothly for me). Please tell me if this works for you as well! Adrian S On Thu, Feb 10, 2011 at 9:49 PM, Deepak Shetty <[email protected]> wrote: > >generate the range of files offline before your test. > Which is of course the better way of doing it. > However in this case I think the poster is implying that the Order id is > dynamically generated (extracted) so this technique may not work > > I wrote(copied) some java code illustrating how to do this here > > http://theworkaholic.blogspot.com/2011/02/dynamic-values-within-files.html > > regards > deepak > > On Thu, Feb 10, 2011 at 12:39 AM, Felix Frank <[email protected]> wrote: > > > Or failing that, generate the range of files offline before your test. > > Have each iteration pick the correct input file, using e.g. a CSV > > Configuration element. > > > > On 02/10/2011 06:35 AM, Deepak Shetty wrote: > > > no out of the box way as far as I know, youll have to do this with java > > code > > > > > > regards > > > deepak > > > > > > On Wed, Feb 9, 2011 at 9:29 PM, Ragini Thakur <[email protected]> > > wrote: > > > > > >> Can anyone please reply. Any pointers will be helpful. > > >> > > >> Regards, > > >> Ragini Thakur > > >> > > >> > > >> -----Original Message----- > > >> From: Ragini Thakur [mailto:[email protected]] > > >> Sent: Wednesday, February 09, 2011 4:42 PM > > >> To: JMeter Users List > > >> Subject: Modify the POST Request Data > > >> > > >> Hi All, > > >> > > >> > > >> > > >> In our test plan we have a HTTP Post request sample to which we are > > >> passing an XML file through option "Send Files With Request". The XML > > >> file to be sent with request contain on Tag "Order id" which need to > be > > >> modified [ dynamically during test plan executing] before sending the > > >> request. > > >> > > >> > > >> > > >> How shall the Post request XML be modified dynamically during test run > > >> before the request is Post? > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > >

