Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jMeter returns 401 Unauthorized error for search request

I need to do performance testing of search in jMeter but I get 401 Unauthorized error. Cookies are sent in request, and login seems to be successful. I ran out of ideas how to fix this. Below I attach screenshots of my test plan and of recording from Burp. Hope you'll help me find out the problem

Login request

Login Response

Search request

Search response

Burp

like image 833
alice Avatar asked Dec 19 '25 22:12

alice


1 Answers

You should be looking into "Response Data" tab of the View Results Tree listener as well, "Sampler Result" doesn't tell the full story as in case of HTTP Protocol JMeter automatically considers response status codes below 400 as successful. You will be able to ensure that you are logged in and get more information regarding this "Unauthorized" request.

I also think that you should not be seeing this Authorization header, if you have it hard-coded in the HTTP Header Manager - I would suggest removing it.

99.9% of failed logins are due to incorrect or missing correlation so please double check all the parameters, cookies and headers to detect any dynamic entities.

like image 178
Dmitri T Avatar answered Dec 22 '25 15:12

Dmitri T