Vinod
Vinod

Reputation: 2311

Forbidden response in post request-jMeter

I am trying hit localhost from jMeter with port 9090 and passing two user name and password parameters. When I run the test plan I'm getting the Forbidden response from jMeter.

My test plan is as follows,

enter image description here

And If run the above test plan the result is like this,

enter image description here

How to resolve this? Any suggestions please!!

Upvotes: 1

Views: 5994

Answers (2)

CharlieS
CharlieS

Reputation: 1452

You are using the incorrect authentication method for the server.

The way you have programmed jmeter will send a request to the server like:

http://localhost:9090/node?name=admin&pass=admin

However, your server is expecting a request like:

http://admin:admin@localhost:9090/

The former is an application authentication method, and the latter is server basic authentication method.

To provide the server with the correct request for Basic Authentication you can use the HTTP Authorization Manager, using your username and password. This will manage the entire security session for you during your tests. It will keep you logged on as you send further requests.

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168072

It looks like Basic Authentication challenge. Add a HTTP Authorization Manager to your test plan and put authentication details in there.

Upvotes: 1

Related Questions