0
votes

I am doing a testing

  1. I have setup an HTTP Authorization Manager to manage my Basic Browser Authentication. This is declared before my HTTP request - making each HTTP request header contains

    Authorization: SOMETHING sOmeGibber1SHCOdes...
    
  2. As some point in my testing, I need to add a new entry in the Authorization header. So I created an HTTP header Manager and added something like:

    Authorization: somethingElse @n0therGibber15hC0de...
    

    and this overrides my existing header setup by my HTTP Authorization Manager

Question:
If I need both Authorization header - is there a workaround?

Additional info:
I tried extracting the values using regext extractor and concatenate the strings in the HTTP Header manager... does't seem to work. I think simply copying the header created by HTTP Authorization manager and putting it directly to the HTTP Header Manager is not being recognized as an authentication by jmeter.

1

1 Answers

0
votes

Please be informed about JMeter Scoping Rules concept

  • If HTTP Authorization Manager lives at the same level with the HTTP Request samplers - it will be applied to all of them
  • If HTTP Authorization Manager (or HTTP Header Manager) is added as a child of a particular HTTP Request sampler - it will be applied to this sampler only

So you can "override" the "global" Authorization header value by adding a HTTP Header Manager as a child of the particular request and defining the header there:

enter image description here