Jmeter not showing up proper response instead giving details of server and connection details

350 Views Asked by At

I am using Jmeter 5.4.1 version, my API is of oauth1.0 type. When I ran my api through postman , it gave my proper json response for example an proper id, but the same api when ran through jmeter gives 200 response code but giving details of server and connection in response body and not the reponse that is expected(a proper id).

Below is the response :

HTTP/1.1 200 OK Server: nginx/1.14.0 (Ubuntu) Date: Wed, 12 May 2021 12:33:10 GMT Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Set-Cookie: PHPSESSID=eqvp0l22u2jo30moqn194meugp; expires=Wed, 12-May-2021 13:33:10 GMT; Max-Age=3600; path=/; domain=dev.moorup.no; HttpOnly Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache X-Frame-Options: SAMEORIGIN Cache-Control: no-store enter image description here

1

There are 1 best solutions below

0
On

You're looking at Response Headers tab of the View Results Tree listener therefore you're seeing the HTTP Response Headers

Just switch to Response Body tab and you will be able to see "raw" HTML Response and several options of rendering it:

enter image description here

Also be aware that it is possible to convert your Postman scripts to JMeter, for OAuth you will still have to do some correlation, but for the main logic record and replay should work more or less fine