1
votes

Need some help with Jmeter .

Environment: Apache Jmeter 5.0 , Java 1.8, Mac OS High Sierra 10.13.6

Problem outline:- Post call not getting 302 response with Location header(redirect) instead get 200 response without Location header

The problem here is in Jmeter but same works in Postman. In a Jmeter thread group I have cookie manager and couple of Get and Post calls. I set to save the cookie in user.properties file. Scenario:- Login 1) first do GET ( call with some query parameters) / login endpoint will give response cookie and csrf-token with 200 then next 2) next do POST with form data ( in xxxform url encoded with csrf-token from get response ) + Cookie from get response from at / login endpoint should return 302 with token is the expected result but getting 200 instead with no redirection in Jmeter. In Postman able to get the desired results.

When the same is replicated in Jmeter with same setting as performed in Postman results are not as expected

Errors in Jmeter are:- 404 with location header missing or 200 with no Location response header

But not 302 with Location response header

With how many different combinations attempted.

Attached my sample TestPlans and Post request. Have also tried to place form data in Body instead in Parameters tab but have the same result.

Thanking in advance! Appreciate anyone who could share their thoughts and rescue from this current issue.

enter image description here

You are clearly doing different requests. Put them through burp proxy or fiddler and compareKonrads
You are right, thank you for bringing that up.Vim