2
votes

I have a JMeter plan using an HTTP sampler that I am trying to add a header to the request. The header should be really simple custom: type

Example of project

But when I run the test I don't see the header....

enter image description here

What am I missing? Why is my header not showing up in the request?

Update

I also tried this but got the same result.

enter image description here

1
Can you show getsession?user7294900
It isn't really a valid answer because the problem wasn't the order it was the fact that it doesn't show the headers properly for invalid requests, ergo I haven't accepted the answer.JGleason

1 Answers

0
votes

Your issue is due to wrong scoping of Header Manager.

Either put it as child of Get Session or child of Test plan if it applies to whole Requests of test plan.

Example:

Test Plan

If it fails, it could be due to your User Credentials Pre-Processor (which runs before GetSession request is sent), but as you don't show code.

Another option is that you're seeing redirect request instead of initial one, check your config so that you see the 2 requests:

Redirect config