jmeter - Jmeter_ Response Error Like :http response code: 405 Method not allowed -
when trying upload image in web application using post method of http using jmeter ,its throwing error below
sampler request:
size in bytes: 436 headers size in bytes: 335 body size in bytes: 101 sample count: 1 error count: 1 data type ("text"|"bin"|""): text response code: 405 response message: method not allowed response headers: http/1.1 405 method not allowed allow: get, head, options, trace content-length: 101 content-type: text/html server: microsoft-iis/8.0 x-powered-by: asp.net set-cookie: arraffinity=a1634f39ccba9517317254d32be7078bb62c2877a947d85cab990f2708382045;path=/;domain=revflexsit.azurewebsites.net date: tue, 28 jun 2016 10:04:41 gmt httpsampleresult fields: contenttype: text/html dataencoding: null
request:
post http://revflexsit.azurewebsites.net/#//testerprofile post data: --8wpdqrxy5gld81_9cclhn-xfotrwvh4dh4srjx content-disposition: form-data; name="profileuploadphoto"; filename="tulips.jpg" content-type: image/jpeg content-transfer-encoding: binary <actual file content, not shown here> --8wpdqrxy5gld81_9cclhn-xfotrwvh4dh4srjx-- [no cookies] request headers: connection: keep-alive content-length: 621121 content-type: multipart/form-data; boundary=8wpdqrxy5gld81_9cclhn-xfotrwvh4dh4srjx; charset=us-ascii host: revflexsit.azurewebsites.net user-agent: apache-httpclient/4.5.2 (java/1.8.0_40)
response data:
the page looking cannot displayed because invalid method (http verb) being used.
the server response pretty self-explanatory, you're not allowed make post requests url, get, head, option , trace ones.
why not record test scenario using http(s) test script recorder , modify resulting test "skeleton" required?
if still eager build scenario manually,looking http://revflexsit.azurewebsites.net/ site, seems correct request like:
- path:
/api/testerprofile/uploadtesterprofile?id=${your_id_here}&updateadminid=0&dimensions=x,y,x,y
files upload:
- file path: full path image, you're trying upload
- parameter name:
profileuploadphoto
- mime type: relevant photo mime type
don't forget tick "use multipart/form-data post" box.
see how test image upload functionality jmeter more detailed explanation.
Comments
Post a Comment