On 18/03/2008, Sonam Chauhan <[EMAIL PROTECTED]> wrote: > > > Is it possible to substitute variables at runtime for the FTP > upload? > > > > > Not easily. > > > > You could use the BeanShell Pre-processor to edit the file, but if > > there are multiple threads involved, then you would need to generate a > > unique name for each thread, and then change the name. Could be messy. > > > > Might be easier to create your own version of the FTP Sampler to do > this. > > > Thanks Sebb. Only a single thread was involved. > > I resolved this by having Perl preprocess a copy of the file externally > and then call JMeter, passing in the modified filename with the -x > attribute.
I thought the variable was only determined at JMeter run-time, otherwise I would have suggested that... > > > The FTP sampler operates on a file only, whereas the other samplers > > allow content to be provided via the GUI. > > > > Variables in files are not currently processed by JMeter. > > > Would it be worthwhile for me to put in a Bugzilla enhancement asking > for a text input area to the FTP sampler GUI, that would also using > variables? This would bring FTP sampler features in line with other > samplers. > As you wish ... > > Regards, > Sonam Chauhan > -- > Corporate Express Australia Ltd. > Phone: +61-2-93350725, Email: [EMAIL PROTECTED] > > -----Original Message----- > From: sebb [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 18 March 2008 10:40 PM > To: JMeter Users List > > Subject: Re: preprocess FTP upload > > On 17/03/2008, Sonam Chauhan <[EMAIL PROTECTED]> wrote: > > <sheepish look/> ... Sorry, sent the last email in haste > > > > > > > > ..... I need to put unique keys into a file uploaded with the 'FTP > > Request' sampler in JMeter 2.3.1, so that the text being uploaded > will > > be something like this: > > > > ---------------------- > > > > Field 1: ${random_item_id1} > > > > Field 2: ${random_item_id2} > > > > .... > > > > ---------------------- > > > > > > > > The problem is the 'FTP Request' sampler does not seem to substitute > > variables in the data it dispatches in the request, as say, the HTTP > > Request and SOAP/XML-RPC samplers do. > > > > The FTP sampler operates on a file only, whereas the other samplers > allow content to be provided via the GUI. > > Variables in files are not currently processed by JMeter. > > > > > Is it possible to substitute variables at runtime for the FTP upload? > > > > Not easily. > > You could use the BeanShell Pre-processor to edit the file, but if > there are multiple threads involved, then you would need to generate a > unique name for each thread, and then change the name. Could be messy. > > Might be easier to create your own version of the FTP Sampler to do > this. > > > > > > > > > Regards, > > > > Sonam Chauhan > > > > -- > > > > Corporate Express Australia Ltd. > > > > Phone: +61-2-93350725, Email: [EMAIL PROTECTED] > > > > > > ________________________________ > > > > From: Sonam Chauhan > > Sent: Tuesday, 18 March 2008 9:30 AM > > To: 'JMeter Users List' > > Subject: preprocess FTP upload > > > > > > > > > > Hi - I need to put unque keys in > > > > > > > > > > > > Regards, > > > > Sonam Chauhan > > > > -- > > > > Corporate Express Australia Ltd. > > > > Phone: +61-2-93350725, Email: [EMAIL PROTECTED] > > > > > > > > > > The information contained in this email and any attached files are > strictly > > private and confidential. This email should be read by the intended > addressee > > only. If the recipient of this message is not the intended > addressee, please > > call Corporate Express Australia Limited on +61 2 9335 0555 or > Corporate Express > > New Zealand Limited on +64 9 279 2555 and promptly delete this email > and any > > attachments. The intended recipient of this email may only use, > reproduce, > > disclose or distribute the information contained in this email and > any attached > > files with Corporate Express' permission. If you are not the intended > addressee, > > you are strictly prohibited from using, reproducing, disclosing or > distributing > > the information contained in this email and any attached files. > Corporate > > Express advises that this email and any attached files should be > scanned to > > detect viruses. Corporate Express accepts no liability for loss or > damage > > (whether caused by negligence or not) resulting from the use of any > attached > > files. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > The information contained in this email and any attached files are strictly > private and confidential. This email should be read by the intended addressee > only. If the recipient of this message is not the intended addressee, please > call Corporate Express Australia Limited on +61 2 9335 0555 or Corporate > Express > New Zealand Limited on +64 9 279 2555 and promptly delete this email and any > attachments. The intended recipient of this email may only use, reproduce, > disclose or distribute the information contained in this email and any > attached > files with Corporate Express' permission. If you are not the intended > addressee, > you are strictly prohibited from using, reproducing, disclosing or > distributing > the information contained in this email and any attached files. Corporate > Express advises that this email and any attached files should be scanned to > detect viruses. Corporate Express accepts no liability for loss or damage > (whether caused by negligence or not) resulting from the use of any attached > files. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

