0

I need to get an id from a post request. So this is my HTTP Request and header manager

View results listener output - Sampler result and Request The response data is :

{ : "status":400, : "success":false, : "message":"Request body is missing!" }

I tried using the blazemeter chrome plugin and for this same request, they are using the body data and parsing the entire form data in there. Can someone help me with this?

Authorization Bearer Issue Screenshots:

BeanShell PreProcessor Script

Request Data Output

Diya
  • 5
  • 5

1 Answers1

0

My expectation is that you don't need to tick this Use multipart/form-data for POST box. You seem to be testing an API therefore I believe you should be sending the body data "as is"

JMeter multipart-form/data

I would recommend comparing the requests which are being sent by JMeter and the real browser using a sniffer tool like Fiddler or Wireshark, identify the differences and amend your JMeter configuration so the request simulated by JMeter would look exactly like the request sent by the real browser (apart from dynamic parameters which need to be correlated)

If you have troubles with understanding what needs to be done - update your question with screenshots coming from the sniffer tools showing request headers and bodies for both JMeter and the real browser

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thank you for answering this @Dmitri T. The issue is with Authorization Bearer Token. I tried to extract that token by looking into your answers for some other stack questions --> https://stackoverflow.com/questions/24542747/jmeter-alter-http-headers-during-test/43283700#43283700. But Unable to capture the Bearer Token. It says Null. I have attached those screenshots in the Question for your reference. Kindly help to solve this issue – Diya Sep 05 '18 at 20:53
  • Can someone help me with this? – Diya Sep 10 '18 at 17:31