swati khanna
swati khanna

Reputation: 19

While using HTTP request defaults in Jmeter , it is hitting wrong URL while running

enter image description here

Here i have two HTTP request , one is hitting the correct uRL , other is hitting the wrong URL while using a HTTP Request Defaults enter image description here

the second image has the result tree in which one request is going to the correct URL and other request for the same page is going to the incorrect URL. enter image description here

Upvotes: 2

Views: 652

Answers (3)

Dmitri T
Dmitri T

Reputation: 168147

According to HTTP Request Defaults documentation:

Path

The path to resource (for example, /servlets/myServlet). If the resource requires query string parameters, add them below in the "Send Parameters With the Request" section. Note that the path is the default for the full path, not a prefix to be applied to paths specified on the HTTP Request screens.

Therefore when you face a redirection it might result into failure of calculating the correct redirect target.

Also be aware that according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article you should always be using the latest version of JMeter so consider upgrading to JMeter 5.3 (or whatever is the latest stable version available at JMeter Downloads page) on next available opportunity

Upvotes: 0

Peter Quan
Peter Quan

Reputation: 808

Analyze from the screenshots you provide, the three fields Protocol, Server Name or IP, Port Number are all empty.

Please compare the two HTTP requests, see the difference in these three fields.

Upvotes: 0

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34566

Avoid setting path on Request Defaults, use it for:

  • host
  • port
  • time-outs
  • all except this one

To help in this issue more, show the HTTP requests for the one working and the one breaking and use View Results Tree to see which requests are being triggered using Request tab

Upvotes: 1

Related Questions