You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2010/01/04 08:51:33 UTC

DO NOT REPLY [Bug 48479] New: JMeter not recording file upload and download scenarios

https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

           Summary: JMeter not recording file upload and download
                    scenarios
           Product: JMeter
           Version: 2.3.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: raghavkumar1988@gmail.com


I am testing a web application and i am recording the application using Jmeter.
The web application has a feature to download its user manual from home page.
When i click on download the manual has downloaded and this downloading  is not
recorded by Jmeter recording controller.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

--- Comment #8 from raghavendra <ra...@gmail.com> 2010-01-04 20:23:23 UTC ---
hi milamber,

the scenario which u mentioned for upload is correct,how can i record the
download

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Sebb <se...@apache.org> 2010-01-04 07:05:33 UTC ---
It's impossible to say what the problem might be from the initial description.

Were there any errors in the jmeter.log file?
Does the download URL use the same protocol and hostname as the home page?

Is the application publicly accessible? If so, what are the details?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

--- Comment #9 from Milamber <mi...@gmail.com> 2010-01-04 23:22:57 UTC ---
Sebb is right, it's just for upload, and for download it's works in http but
file isn't saved by HTTP Request Sampler.

You can use a Listener "Save Responses to a file" as child of HTTP Download
Request to save binary file on disk.

(Sebb, we can close this bug I suppose.)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

raghavendra <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from raghavendra <ra...@gmail.com> 2010-01-04 09:33:42 UTC ---
not working for both the protocols http and https

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #10 from Sebb <se...@apache.org> 2010-01-05 03:22:14 UTC ---
JMeter works for us.

If you are still having a problem, please ask on the user list, or provide a
test case that demonstrates the problem.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

raghavendra <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

--- Comment #5 from Milamber <mi...@gmail.com> 2010-01-04 15:30:44 UTC ---
I think I found the origine of this problem. It isn't a JMeter bug.
When we use JMeter proxy to record a navigating session with a http file
upload, the browser sending only the local filename without path in post data. 
Thus JMeter will only save filename alone in the HTTP Sampler, and will fail
with this error (in view results tree) : see below.

A solution is to put file to upload in the JMeter "working directory" i.e.
JMETER_HOME/bin
With this workaround, it's works for upload and download, because JMeter try to
find the file in this directory when the HTTP Sampler has need to sample in
recording sessions and in load tests.


=== Error message in record session ===
java.io.FileNotFoundException: doc1.doc (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at
org.apache.jmeter.protocol.http.sampler.PostWriter.writeFileToStream(PostWriter.java:406)
    at
org.apache.jmeter.protocol.http.sampler.PostWriter.sendPostData(PostWriter.java:115)
    at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sendPostData(HTTPSampler.java:159)
    at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:514)
    at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1037)
    at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:195)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #3 from Sebb <se...@apache.org> 2010-01-04 09:31:09 UTC ---
Is the download URL http: or https: ?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

--- Comment #2 from raghavendra <ra...@gmail.com> 2010-01-04 09:16:30 UTC ---
hi sebb,

for example if i am trying to record gmail,and if i am testing inbox
functionality,
clickn on email and try to download the attachment
in this case jmeter is recording the scenario upto click on email,when i click
on download the attachment is downloaded but  not recorded by jmeter

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

--- Comment #7 from Sebb <se...@apache.org> 2010-01-04 15:47:50 UTC ---
This is only true for upload.

If the browser is able to download a file successfully, but the download is not
recorded, then the most likely cause is that the browser did not send the
download request via the proxy, for example because the download URL uses
https: (which is not supported in the proxy for 2.3.4)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48479] JMeter not recording file upload and download scenarios

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48479

--- Comment #6 from Milamber <mi...@gmail.com> 2010-01-04 15:35:15 UTC ---
Source code reference:
In package org.apache.jmeter.protocol.http.config.MultipartUrlConfig (last
revision)
Line 132-136

===
                final String filenamePrefix = "filename=\""; //$NON-NLS-1$
                if (contentDisposition.indexOf(filenamePrefix) > -1) {
                    // Get the filename
                    index = contentDisposition.indexOf(filenamePrefix) +
filenamePrefix.length();
                    String path = contentDisposition.substring(index,
contentDisposition.indexOf("\"", index)); //$NON-NLS-1$
===

Browser send only "filename=doc1.doc"

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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