You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by wenqatesh <we...@gmail.com> on 2009/02/25 18:20:20 UTC

how to use variables in Filepath

Hi all,

I am testing a web based application Using JMETER and i have a scenario
where in, i need to upload different files in subsequent iterations.
and my requirement is exactly to send files from the location

D:\Venkadesh\file1.pdf
D:\Venkadesh\file2.pdf
D:\Venkadesh\file3.pdf
D:\Venkadesh\file4.pdf
in diff iterations through the "send files with the request " part of the
HTTP sampler.

Filename=file1.pdf,file2.pdf,file3.pdf,file4.pdf
The way i attempted to solve is.
D:\Venkadesh\${Filename}

but the file uploading does not takes place.
When i tried printing the value of Variable seperately,it is doing correctly

Pls suggest me how to achieve my requirement.

Note: i am able to upload files even without MIME type if i give explicitly
the filepath.
http://www.nabble.com/file/p22207472/jmeter%2Bupload.jpg =)

-----

Thanks,
Venkadesh=)
-- 
View this message in context: http://www.nabble.com/how-to-use-variables-in-Filepath-tp22207472p22207472.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use variables in Filepath

Posted by sebb <se...@gmail.com>.
On 26/02/2009, wenqatesh <we...@gmail.com> wrote:
>
>  Hi Sebb,
>
>  1.The variable has been defined using CSV data set config,so i go with your
>  option to define it at the early stage.
>
>  2.The log didn't stamp any error.

But the HTTP sampler presumably did, so what did that say in the Tree
View Listener?

>  -Venkadesh
>
>  -----
>  Thanks,
>  Venkadesh=)
>
> --
>  View this message in context: http://www.nabble.com/how-to-use-variables-in-Filepath-tp22207472p22221595.html
>
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use variables in Filepath

Posted by wenqatesh <we...@gmail.com>.
Hi Sebb,

1.The variable has been defined using CSV data set config,so i go with your
option to define it at the early stage.

2.The log didn't stamp any error.

-Venkadesh

-----
Thanks,
Venkadesh=)
-- 
View this message in context: http://www.nabble.com/how-to-use-variables-in-Filepath-tp22207472p22221595.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use variables in Filepath

Posted by sebb <se...@gmail.com>.
On 25/02/2009, wenqatesh <we...@gmail.com> wrote:
>
>  Hi all,
>
>  I am testing a web based application Using JMETER and i have a scenario
>  where in, i need to upload different files in subsequent iterations.
>  and my requirement is exactly to send files from the location
>
>  D:\Venkadesh\file1.pdf
>  D:\Venkadesh\file2.pdf
>  D:\Venkadesh\file3.pdf
>  D:\Venkadesh\file4.pdf
>  in diff iterations through the "send files with the request " part of the
>  HTTP sampler.
>
>  Filename=file1.pdf,file2.pdf,file3.pdf,file4.pdf
>  The way i attempted to solve is.
>  D:\Venkadesh\${Filename}

Looks OK.

>  but the file uploading does not takes place.

What is the error message?
Check jmeter.log

>  When i tried printing the value of Variable seperately,it is doing correctly

Perhaps it is not defined when it is needed by the sampler.

How are you defining the variable?

>  Pls suggest me how to achieve my requirement.

Try defining the variable on the Test Plan initially; when that is
working, try defining it so it changes for each loop.

>  Note: i am able to upload files even without MIME type if i give explicitly
>  the filepath.
>  http://www.nabble.com/file/p22207472/jmeter%2Bupload.jpg =)
>
>  -----
>
>  Thanks,
>  Venkadesh=)
>
> --
>  View this message in context: http://www.nabble.com/how-to-use-variables-in-Filepath-tp22207472p22207472.html
>  Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org