You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jannetta Steyn <ja...@henning.org> on 2009/05/08 15:31:54 UTC

downloading and uploading with the HTTP sampleer

Hi Folks

I'm not sure whether I'm on the right track here to accomplish what I intend
to, but any pointers would be welcomed.

I want to download a file (via HTTP using the HTTP sampler), then I want to
save the file and upload it again later in the test.

I created a HTTP Sampler that seems to succeed in the download. The sampler
result says it succeeded and the data in Request seems to be correct.
However, nothing is displayed in the Response Data. In this case I tried to
download a .xls file, but the file could potentially be anything.

Can I save this file somewhere and then, how would I go about uploading it
again?

Kind Regards and thank you for any help.
Jannetta

-- 

===================================
Web site: http://www.jannetta.com
Email: jannetta@henning.org
===================================

Re: downloading and uploading with the HTTP sampleer

Posted by sebb <se...@gmail.com>.
On 08/05/2009, Jannetta Steyn <ja...@henning.org> wrote:
> >
>  > See:
>  >
>  >
>  > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Save_Responses_to_a_file
>  >
>  > Add this as a child of the sampler (so it only saves that file).
>  >
>
>
> That worked. Thank you very much.
>
>
>
>  > You'll have to see what file name it generates and use that, but it
>  > won't change unless the file type changes.
>  >
>  > The next release of JMeter will have an option to save the filename in
>  > a variable, which makes it easier.
>  >
>
>
> I have used returnVal from the foreach controller and it gives me the
>  correct name. The only problem now is that the "Save Responses to a file"
>  adds an extra extension to the file.
>
>  So three questions:
>  1. Is there a way around that

No, but why does it matter?

>  2. How involved would it be to change the post processor

It has already been changed - see the code in SVN.

>  3. When is the next version of JMeter to be released?

Hopefully this quarter.

>  Regards
>
> Jannetta
>
>  --
>
>  ===================================
>  Web site: http://www.jannetta.com
>  Email: jannetta@henning.org
>  ===================================
>

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


Re: downloading and uploading with the HTTP sampleer

Posted by Jannetta Steyn <ja...@henning.org>.
>
> See:
>
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Save_Responses_to_a_file
>
> Add this as a child of the sampler (so it only saves that file).
>

That worked. Thank you very much.


> You'll have to see what file name it generates and use that, but it
> won't change unless the file type changes.
>
> The next release of JMeter will have an option to save the filename in
> a variable, which makes it easier.
>

I have used returnVal from the foreach controller and it gives me the
correct name. The only problem now is that the "Save Responses to a file"
adds an extra extension to the file.

So three questions:
1. Is there a way around that
2. How involved would it be to change the post processor
3. When is the next version of JMeter to be released?

Regards
Jannetta

-- 

===================================
Web site: http://www.jannetta.com
Email: jannetta@henning.org
===================================

Re: downloading and uploading with the HTTP sampleer

Posted by sebb <se...@gmail.com>.
On 08/05/2009, Jannetta Steyn <ja...@henning.org> wrote:
> Hi Folks
>
>  I'm not sure whether I'm on the right track here to accomplish what I intend
>  to, but any pointers would be welcomed.
>
>  I want to download a file (via HTTP using the HTTP sampler), then I want to
>  save the file and upload it again later in the test.
>
>  I created a HTTP Sampler that seems to succeed in the download. The sampler
>  result says it succeeded and the data in Request seems to be correct.
>  However, nothing is displayed in the Response Data. In this case I tried to
>  download a .xls file, but the file could potentially be anything.
>
>  Can I save this file somewhere and then, how would I go about uploading it
>  again?
>

See:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Save_Responses_to_a_file

Add this as a child of the sampler (so it only saves that file).

You'll have to see what file name it generates and use that, but it
won't change unless the file type changes.

The next release of JMeter will have an option to save the filename in
a variable, which makes it easier.

>  Kind Regards and thank you for any help.
>  Jannetta
>
>
>  --
>
>  ===================================
>  Web site: http://www.jannetta.com
>  Email: jannetta@henning.org
>  ===================================
>

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