Re: Fw: Re: Using HTTP Request to test POST to upload and store a file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Re: Using HTTP Request to test POST to upload and store a file

Felix Schumacher
Am 03.08.2017 um 17:18 schrieb Lisa Waugh:
Hi Felix,
I add the mime type of image/jpeg.  It had no effect on tests 1,2,4 but it caused test 3 to fail.  I removed the mime type and it went back to working.
 
The original 3 screen shots are in the pdf.
 
This is a screen shot showing the 3rd one failing with the mime type set:
 
I would like to see the tab "Samper result", too. Instead of an image, you could post the content, as it is text.

Another thing you could try is to set the logging to debug for "org.apache.http" and "org.apache.jmeter.protocol.http". (In 3.2 this can be done in bin/log4j2.xml)

Felix

and one with it working without the mime type set:
 
and I'll attach the 3 images I'm using.  These were picked for file size, not content.
and yes, test 1 & 4 are the same file.  I was checking to see if placement made any difference at all.
 
thanks,
Lisa
 
 
 
 
Lisa Waugh
Performance Test Engineer
IBM Watson Education
+1 (720) 396-0112
+1 (704) 907-7008 m
[hidden email]


Watson Education 
 
 
 
----- Original message -----
From: Felix Schumacher [hidden email]
To: [hidden email]
Cc:
Subject: Re: Using HTTP Request to test POST to upload and store a file
Date: Wed, Aug 2, 2017 3:28 PM
 
Am 31.07.2017 um 19:35 schrieb Lisa Waugh:
Hi Felix,
Here is the test:
I used the test from the other mail (copy and pasted it, added the jmeter plugins). I changed the destination to the local jmeter mirror server and placed some dummy images in place of the images mentioned in the test.

I see a few minor things like missing content-type for the images and one image is use twice.

Try to add a MIME-Type to the File Upload tab.

If that doesn't help, mail me the missing images (the jmeter screenshots).

Felix

 


And I can see that the variables are being substituted correctly in the full raw request:

POST https://ecl-stage.mybluemix.net/api/v1/profile/addMediaToLearnerCollection

POST data:
--35h2RHk7e5acZtT4mBtJXiR0LkVP4Gx7xHW6cbP6
Content-Disposition: form-data; name="sessionContextId"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit

df2c83c0-7605-11e7-bac6-a123d5f99863
--35h2RHk7e5acZtT4mBtJXiR0LkVP4Gx7xHW6cbP6
Content-Disposition: form-data; name="vocabWord"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit

arachnid
--35h2RHk7e5acZtT4mBtJXiR0LkVP4Gx7xHW6cbP6
Content-Disposition: form-data; name="learnerGivenMediaLabels"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit

arachnid
--35h2RHk7e5acZtT4mBtJXiR0LkVP4Gx7xHW6cbP6
Content-Disposition: form-data; name="mediaCategory"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit

IMAGE
--35h2RHk7e5acZtT4mBtJXiR0LkVP4Gx7xHW6cbP6
Content-Disposition: form-data; name="mediaFile"; filename="IMG_1573.JPG"
Content-Type:
Content-Transfer-Encoding: binary

<actual file content, not shown here>
--35h2RHk7e5acZtT4mBtJXiR0LkVP4Gx7xHW6cbP6--


[no cookies]

Request Headers:
Connection: keep-alive
Content-Length: 2014691
Content-Type: multipart/form-data; boundary=35h2RHk7e5acZtT4mBtJXiR0LkVP4Gx7xHW6cbP6; charset=US-ASCII
Host: ecl-stage.mybluemix.net
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_131)


This is for the larger file that fails.

How do I set up a debit sampler?  I don't see that in the list of things I can add to my test.

Thanks,
Lisa

Lisa Waugh
720-396-0112
Fax:  720-396-0112
Charlotte, NC








From:        Felix Schumacher [hidden email]
To:        JMeter Users List [hidden email]
Date:        07/31/2017 01:15 PM
Subject:        Re: Using HTTP Request to test POST to upload and store a file



The images didn't make it through the mailing list.

Can you post the test? I counted three images in the log, only. Can you add a debit sampler to check that your variables are correctly initialized?

Felix




Am 31. Juli 2017 18:20:42 MESZ schrieb Lisa Waugh [hidden email]:
>Hi Felix,
>Here is my HTTP Request:
>
>
>
>
>
>I have the same http request set up to run 4 times.  The only thing I'm
>
>changing is the file name.
>
>
>I can run this same exact request in Postman on the same machine and it
>
>work consistently so I don't think I have any firewall issues.
>
>I am running JMeter 3.1 r1770033 and Java
>java version "1.8.0"
>Java(TM) SE Runtime Environment (build pwa6480sr4fp5-20170421_01(SR4
>FP5))
>IBM J9 VM (build 2.8, JRE 1.8.0 Windows 10 amd64-64 Compressed
>References
>20170419_344392 (JIT enabled, AOT enabled)
>J9VM - R28_20170419_1004_B344392
>JIT  - tr.r14.java_20170419_344392
>GC   - R28_20170419_1004_B344392_CMPRSS
>J9CL - 20170419_344392)
>JCL - 20170420_01 based on Oracle jdk8u131-b11
>
>I enabled debugging and captured the log
>2017/07/31 11:32:14 INFO  - jmeter.engine.StandardJMeterEngine: Running
>
>the test!
>2017/07/31 11:32:14 INFO  - jmeter.samplers.SampleEvent: List of
>sample_variables: []
>2017/07/31 11:32:14 INFO  - jmeter.gui.util.JMeterMenuBar:
>setRunning(true,*local*)
>2017/07/31 11:32:14 INFO  - jmeter.engine.StandardJMeterEngine:
>Starting
>ThreadGroup: 1 : Group for Admin
>2017/07/31 11:32:14 INFO  - jmeter.engine.StandardJMeterEngine:
>Starting 1
>threads for group Group for Admin.
>2017/07/31 11:32:14 INFO  - jmeter.engine.StandardJMeterEngine: Thread
>will continue on error
>2017/07/31 11:32:14 INFO  - jmeter.threads.ThreadGroup: Starting thread
>
>group number 1 threads 1 ramp-up 10 perThread 10000.0
>delayedStart=false
>2017/07/31 11:32:14 INFO  - jmeter.threads.ThreadGroup: Started thread
>group number 1
>2017/07/31 11:32:14 INFO  - jmeter.engine.StandardJMeterEngine: All
>thread
>groups have been started
>2017/07/31 11:32:14 INFO  - jmeter.threads.JMeterThread: Thread
>started:
>Group for Admin 1-1
>2017/07/31 11:32:15 INFO  - jmeter.services.FileServer: Stored:
>c:\ibm\apache-jmeter-3.1\bin\inputs\IMG_1573.JPG
>2017/07/31 11:32:34 INFO  - jmeter.services.FileServer: Stored:
>c:\ibm\apache-jmeter-3.1\bin\inputs\IMG_4536.JPG
>2017/07/31 11:32:44 INFO  - jmeter.services.FileServer: Stored:
>c:\ibm\apache-jmeter-3.1\bin\inputs\dsc00010.jpg
>2017/07/31 11:33:15 INFO  - jmeter.threads.JMeterThread: Thread is
>done:
>Group for Admin 1-1
>2017/07/31 11:33:15 INFO  - jmeter.threads.JMeterThread: Thread
>finished:
>Group for Admin 1-1
>2017/07/31 11:33:15 INFO  - jmeter.engine.StandardJMeterEngine:
>Notifying
>test listeners of end of test
>2017/07/31 11:33:15 INFO  - jmeter.gui.util.JMeterMenuBar:
>setRunning(false,*local*)
>
>I'll capture a thread dump and send it later today.
>
>thanks,
>Lisa
>
>Lisa Waugh
>Performance Test Engineer
>IBM Watson Education
>+1 (720) 396-0112
>+1 (704) 907-7008 m
>[hidden email]
>
>
>Watson Education
>
>
>
>----- Original message -----
>From: Felix Schumacher [hidden email]
>To: [hidden email]
>Cc:
>Subject: Re: Using HTTP Request to test POST to upload and store a file
>Date: Sat, Jul 29, 2017 5:57 AM
>
>Am 28.07.2017 um 13:30 schrieb Felix Schumacher:
>>
>> Am 27. Juli 2017 23:50:20 MESZ schrieb Lisa Waugh [hidden email]:
>>> I'm trying to use HTTP Request to upload and store a file via a POST
>to
>>> a
>>> REST api.  I can't use HTTP Raw because it is an https request.
>>>
>>> I can successfully accomplish this with smaller files (<= 500 kb).
>>> With
>>> larger files (>= 582 kb) it fails with a 500 Error: Connection
>error.
>>> I
>>> know it is not an issue with my REST api because I can use POSTMAN
>and
>>> successfully post the same file.
>>>
>>> I've increased the Connect timeouts and Response timeouts to
>80000000
>>> msecs.
>>>
>>> These are images or audio recordings, not text files.
>>>
>>> No errors appear in the jmeter logs.
>> I think I can confirm this. Is the requests duration longer than
>expected?
>>
>> Could you take a threaddump while the request is waiting?
>Strangely enough, I can't reproduce it at home with my linux setup.
>
>How do you setup the http sampler to send the file? Which version of
>JMeter and Java are you using. Is this between different computers,
>could there be a firewall that interferes with the requests?
>
>Can you try to set the logging of JMeter to something more detailed
>like
>debug?
>
>Felix
>>
>> Felix
>>
>>> Is there a setting controlling the size somewhere I haven't found?
>Is
>>> there anyway to get this to work successfully?
>>>
>>> Lisa Waugh
>>> 720-396-0112
>>> Fax:  720-396-0112
>>> Charlotte, NC
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>
>




 
 
 
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]