Hi,

I am using Jmeter 1.7 for testing a webserver. I tried to upload a file
and form content to a servlet,
the Html file looks like:

**********************************************
<form target="output" method="POST"
action="http://localhost:2002/?type=0&action=MetricRequestURL";
enctype="multipart/form-data">
<input type="file" name="xmlcontent">
<input target="output" type="submit" value="Submit">
</form>
**********************************************

what I did with jmeter:
1.start jmeter by run jmeter.bat
2.add a new ThreadGroup to Test
plan
3. add a new Http Request to my ThreadGroup,then config the Http Request
as
        set ServerName or IP:    localhost
        set Port Number:             2002
             Protocol:                    HTTP
              Method:                    POST
              send parameters with the request:
                    Name     value
                    type        0
              send a file with the request:
                    Filename: the file's absolute path
                    ParameterName: xmlcontent
                    MIME Type: text/xml

when run the test, I got a IOException for the 400 respond code,

URL = http://localhost:2002/
java.io.IOException
        at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSample
r.java:464)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSample
r.java:164)
        at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:138)
        at java.lang.Thread.run(Unknown Source)

do I use the correct controller, or if you can upload a file
successfully, please let me know your steps, thanks for your help

Hongfei


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to