You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Allen Granum <ag...@leonovus.com> on 2014/10/23 19:46:02 UTC

Corrupted HTTP body data when using test script recorder


I've been using the HTTP(S) Test Script Recorder in Jmeter to record some amazon S3 actions. Specifically a file upload (PUT). Problem is, the captured HTTP sampler has a body data that has some extra data inserted into it. 

My original sample file I uploaded is 25630 bytes. A small image file (jpg). The one that gets uploaded with the captured HTTP sampler is 25723 bytes. 




I performed a hex compare between the original and the one from the sampler. (I downloaded normally what the captured sampler uploaded). What I found immediately was a single byte inserted very near the top of the file, which had the effect of offsetting everything else after that by one byte and making it all look different. Since the difference in size is just under 100 bytes, I'm guessing this is happening in just under 100 other places in the file as well. 




Look at the different Content-Length headers below... 




Here are the headers from when I upload the file manually: 
User-Agent: S3 Browser 4-6-1 http://s3browser.com
x-amz-acl: private
x-amz-date: Thu, 23 Oct 2014 17:25:08 GMT
Content-Type: image/jpeg
Content-Length: 25630 


Here are the headers that Jmeter sends based on the captured sample: 
Connection: keep-alive
Content-Type: image/jpeg
x-amz-date: Thu, 23 Oct 2014 16:57:31 GMT
x-amz-acl: private
User-Agent: S3 Browser 4-6-1 http://s3browser.com
Content-Length: 25723 


Does anyone know why this is and how I might modify my recorder so that it records the file data exactly? 

Allen Granum 
agranum@leonovus.com 


1309 Carling Avenue 
Ottawa, Ontario, Canada K1Z 7L3 
(613) 722-3232 
x263 


Re: Corrupted HTTP body data when using test script recorder

Posted by Shmuel Krakower <sh...@gmail.com>.
Hi
Another option you can take is to create the http sampler manually and not
use the one which was generated for you by the recorder.
Try using the "Send files with the request" section.

Best,

Shmuel Krakower.
www.Beatsoo.org - re-use your jmeter scripts for application performance
monitoring from worldwide locations for free.

On Tue, Oct 28, 2014 at 11:29 PM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> Hello,
> Would it be possible to provide a publicly accessible website with JMX
> plan ?
> Thanks
>
> On Thu, Oct 23, 2014 at 7:46 PM, Allen Granum <ag...@leonovus.com>
> wrote:
>
>> I've been using the HTTP(S) Test Script Recorder in Jmeter to record some
>> amazon S3 actions. Specifically a file upload (PUT). Problem is, the
>> captured HTTP sampler has a body data that has some extra data inserted
>> into it.
>>
>> My original sample file I uploaded is 25630 bytes. A small image file
>> (jpg). The one that gets uploaded with the captured HTTP sampler is 25723
>> bytes.
>>
>>
>> I performed a hex compare between the original and the one from the
>> sampler. (I downloaded normally what the captured sampler uploaded). What I
>> found immediately was a single byte inserted very near the top of the file,
>> which had the effect of offsetting everything else after that by one byte
>> and making it all look different. Since the difference in size is just
>> under 100 bytes, I'm guessing this is happening in just under 100 other
>> places in the file as well.
>>
>>
>> Look at the different Content-Length headers below...
>>
>>
>> Here are the headers from when I upload the file manually:
>>
>> User-Agent: S3 Browser 4-6-1 http://s3browser.com
>> x-amz-acl: private
>> x-amz-date: Thu, 23 Oct 2014 17:25:08 GMT
>> Content-Type: image/jpeg
>> Content-Length: 25630
>>
>> Here are the headers that Jmeter sends based on the captured sample:
>>
>> Connection: keep-alive
>> Content-Type: image/jpeg
>> x-amz-date: Thu, 23 Oct 2014 16:57:31 GMT
>> x-amz-acl: private
>> User-Agent: S3 Browser 4-6-1 http://s3browser.com
>> Content-Length: 25723
>>
>> Does anyone know why this is and how I might modify my recorder so that
>> it records the file data exactly?
>>
>> Allen Granum
>> agranum@leonovus.com
>>
>>
>> 1309 Carling Avenue
>> Ottawa, Ontario, Canada K1Z 7L3
>> (613) 722-3232
>> x263
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
>
>

Re: Corrupted HTTP body data when using test script recorder

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
Would it be possible to provide a publicly accessible website with JMX plan
?
Thanks

On Thu, Oct 23, 2014 at 7:46 PM, Allen Granum <ag...@leonovus.com> wrote:

> I've been using the HTTP(S) Test Script Recorder in Jmeter to record some
> amazon S3 actions. Specifically a file upload (PUT). Problem is, the
> captured HTTP sampler has a body data that has some extra data inserted
> into it.
>
> My original sample file I uploaded is 25630 bytes. A small image file
> (jpg). The one that gets uploaded with the captured HTTP sampler is 25723
> bytes.
>
>
> I performed a hex compare between the original and the one from the
> sampler. (I downloaded normally what the captured sampler uploaded). What I
> found immediately was a single byte inserted very near the top of the file,
> which had the effect of offsetting everything else after that by one byte
> and making it all look different. Since the difference in size is just
> under 100 bytes, I'm guessing this is happening in just under 100 other
> places in the file as well.
>
>
> Look at the different Content-Length headers below...
>
>
> Here are the headers from when I upload the file manually:
>
> User-Agent: S3 Browser 4-6-1 http://s3browser.com
> x-amz-acl: private
> x-amz-date: Thu, 23 Oct 2014 17:25:08 GMT
> Content-Type: image/jpeg
> Content-Length: 25630
>
> Here are the headers that Jmeter sends based on the captured sample:
>
> Connection: keep-alive
> Content-Type: image/jpeg
> x-amz-date: Thu, 23 Oct 2014 16:57:31 GMT
> x-amz-acl: private
> User-Agent: S3 Browser 4-6-1 http://s3browser.com
> Content-Length: 25723
>
> Does anyone know why this is and how I might modify my recorder so that it
> records the file data exactly?
>
> Allen Granum
> agranum@leonovus.com
>
>
> 1309 Carling Avenue
> Ottawa, Ontario, Canada K1Z 7L3
> (613) 722-3232
> x263
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>



-- 
Cordialement.
Philippe Mouawad.