Difference in response between fiddler and jmeter - jmeter

In jmeter I get a response as:
{"mi_fb_res":[],"error":false,"session_status":true}
But in fiddler for the same HTTP request I get
{"mi_fb_res**":[{"id":"47","**n":"WI\/d9kc4owq"}],"error":false,"session_status":true}.
I need the to extract the value "47" in jmeter, how can I do this?

Related

Jmeter: Syntax error while sending a http delete request

We are sending a HTTP DELETE request from JMeter, but getting syntax error (Error 400 Bad request),
Request url: https://somewebsite.org/Acctid/123?AcctId=123
"AcctId=123" is in Query Parameter.
We have no specific headers except for the Cookie and Accept. No content-encoding.
The same request works perfectly fine from Postman.
Any suggestions what could be wrong with our request?
Best!
We cannot tell you what's wrong without seeing your Postman and JMeter configurations.
If the request works in Postman and doesn't in JMeter you could just record it using JMeter's HTTP(S) Test Script Recorder.
Start JMeter's HTTP(S) Test Script Recorder
Import JMeter's certificate into Postman
Configure Postman to use JMeter as the proxy
Run your request in Postman.
That's it, JMeter should generate proper HTTP Request sampler and HTTP Header Manager and you should be able to replay the request.

Not able to execute api call for delete through JMeter

I have a delete API http request in Jmeter which is like "serverName/ApplName/api/deleteDataset/{datasetId}"
In the header i have added the below information:
But strangely this api is failing with the below error:
Response code:400
Response message:Bad Request
Please note when i am trying the same API in postmen it is passing without any error. In fact i did not have to pass any header information apart from the access token.
I have tried removing the extra header information(accept,content-type) too from JMeter but that also did not work out.
If your request works fine in Postman the easiest way of replicating it in JMeter would be just recording it using JMeter's HTTP(S) Test Script Recorder
Start the HTTP(S) Test Script Recorder
Import JMeter's certificate into Postman, this way JMeter will be able to intercept and record HTTPS requests
Configure Postman to use JMeter as the proxy so the request to API would go through JMeter
Run your request in Postman
JMeter will generate HTTP Request Sampler and HTTP Header Manager
Correlate bearer token and replace hard-coded value with the appropriate JMeter Variable
You should be able to run the request successfully now

How to fix response issue in jmeter

After adding some data from csv file getting 415 status code in jmeter response. I am getting success in postman for same payload which is present in jmeter sample request header. But in jmeter it's showing error. Error is "{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.13","title":"Unsupported Media Type","status":415,"traceId":"|fc0a70d2-46g24ac7bc010330.fc0a10d3_c9c4264_"}". I configured all the things properly. Please guide me how to fix that issue
You didn't configure at least "one thing" property: HTTP Header Manager. Add it to your Test Plan and set it up to send the same "Content-Type" header as Postman does
Most probably the value should be application/json
Also be aware that if you can successfully execute the request using Postman you can just record the request execution using JMeter's HTTP(S) Test Script Recorder.

how can i send query string in body of http request sampler ?(post request)

I am sending query string in body of http request sampler. It is not getting correct response. Not Correctly sending data to server if query string.
enter image description here
When it comes to HTTP POST requests you need to specify URL query string under "Path" input field of the HTTP Request sampler
In general the easiest way of building a correct HTTP Request sampler is just recording your scenario using HTTP(S) Test Script Recorder or in some cases JMeter Chrome Extension might be easier to use

How to send a file using Body binary in Jmeter?

I can upload a file in Postman using Body - binary and
Content-Dispostion Header with values 'binary-data' and path to filename
Postman Request
Postman Body
Jmeter Request
for Jmeter request I am just getting 400. I'd like to know how I can add Body binary file path to Jmeter request?
Thanks
Postman request
Jmeter request
Remove in JMeter header manager the 2 rows that have empty values and are above Content-Disposition
also fix the value of Content-Disposition to remove the spaces
If it still fails show JMeter HTtP Request

Resources