0
votes

I'm currently doing a Performance testing and having a requirement similar(90%) to following question Ignoring-HTTP-Request-Defaults

Scenario - Total of 200 HTTPs Requests:

  1. 150 HTTPs Requests should run with Proxy, Port, Username and Password.
  2. 50 HTTPs Requests should run without Proxy, Port, Username and Password.

To satisfy this requirement, I have created one "HTTP Request Defaults" config element (With Proxy Authentication details) at Project Level and created the 50 separate "HTTP Request Defaults" (Without Proxy Authentication details) for each 50 HTTPs Request.

HTTP Request Default hierarchy screenshot:

enter image description here

So above 50 HTTPs Request Samplers (without Proxy Authentication) is getting failed with the below error message since it's not overriding the globally assigned "HTTP Request Defaults" config element (With Proxy Authentication details)

Response code: Non HTTP response code: org.apache.http.conn.HttpHostConnectException Response message: Non HTTP response message: Connect to proxy.usp.com:8080 [proxy.usp.com/91.195.240.126] failed: Connection timed out: connect
1

1 Answers

0
votes
  1. HTTP Request Defaults obey JMeter Scoping Rules
  2. HTTP Request Defaults provide default values for the fields/settings which are not set in the HTTP Request sampler (or other HTTP Request Defaults)

So if you set proxy at the global level - it will be applied for *all** the HTTP Request samplers in scope.

The solution would be to set proxy details by adding a HTTP Request defaults to the Sampler(s) which need to have proxy.

You cannot "override" parent HTTP Request Defaults proxy settings by providing blank values, as of JMeter 5.1.1 you can only do the opposite thing.

enter image description here