performance testing - PUT in JMeter 415 Unsupported Media Type -
i'm new in performance tests, started using jmeter , creating own scripts. doing stress performance test on api, until post, get, patch working, stopped @ put method. need send file using put method, in postman working (in body using file type selected file, in header multipart/form-data).
i tried put file path in "send files request", parameter name: file, mime type: form-data, content encoding: utf-8.
in request doesn't give me file.
put http://10.111.30.12/api/tasks/2
put data:
[no cookies]
request headers:
connection: keep-alive
x-authtoken: mjeznuzfmemxmzfeqtvbmumxqzyxmdu0mje0oeffrtjdrju0odq0qkrcnduyqkq0qtgxreu0m0y5mdqwmtk1rdjgmee2rdnertixnjfbrje3meq0qtnfqzm1otvbrjmyqui0mkjfn0mwmjyxmkfdrtbfmtqymzyynjywmkremtu0rkmxqtlbmjjdoujfqkmwrjewnddfotewnjgyrdawmtvbotleq0exq0ffqtbgqja2mevdrunfqjgzoeq1mta4odvgouyxmdhbqum0rtc5n0jdqta2rkyynjyxqurgode3num0mdlfn0renem0mtc0nzc4mzczrjndq0vdqzm3q0y2qzu4ree2odg2qzaynee1mzy0qthdn0iwmjhemjde
content-type: multipart/form-data
content-length: 0
host: 10.111.30.12
proxy-connection: keep-alive
user-agent: apache-httpclient/4.2.6 (java 1.5)"
the sampler result:
thread name: api thread group 1-1
sample start: 2015-09-21 15:33:53 eest
load time: 22
connect time: 0
latency: 22
size in bytes: 202
headers size in bytes: 202
body size in bytes: 0
sample count: 1
error count: 1
response code: 415
response message: unsupported media type
also tried put file in body data as: "file: c:\apache-jmeter-2.13\bin\api performance test\file.txt" getting 400 bad request.
please if got idea on how this, tell me too.
since you're testing api expectation need add http header manager send content-type
header value of application/json
.
the best way bottom of issue using sniffer tool wireshark compare what's being sent postman , jmeter , make sure there no differences.
Comments
Post a Comment