In my current project the application passes an authentication token id after login. So, I have used below.

Regular Expression Extractor. to extract the token id from Response Data and i applied the token in Http Header Manager.under Authorization After executing i am getting response like ."Filed to authenticate token". Further, I have also used CSV file config for passing dynamic values.

I don't know what i am missing. Could anyone help me on this??

closed as off-topic by c32hedge, IAmMilinPatel, Bharat Mane, Kevin McKenzie, Nitin Rastogi Jan 20 '18 at 3:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers." – c32hedge, IAmMilinPatel, Bharat Mane, Kevin McKenzie, Nitin Rastogi
If this question can be reworded to fit the rules in the help center, please edit the question.

  • try using json responce extractor – sameer joshi Jan 9 '18 at 12:42
  • 1
    Did you check (with something like a Debug Sampler or jp@gc - Dummy Sampler) if you extract the token correctly? – Camarde Jan 9 '18 at 12:49

First of all check your ${token} variable value using Debug Sampler and View Results Tree listener combination (see How to Debug your Apache JMeter Script guide for details on how to do this).

It might be the case your regular expression extractor fails to fetch the token due to i.e. extra space.

Another assumption is that you need to add Authentication Scheme identifier before the ${token} like:

Authorization: Basic ${token}


Authorization: Bearer ${token}

Check out what is being sent by the real browser and JMeter, the requests must be identical (apart from dynamic values)

Not the answer you're looking for? Browse other questions tagged or ask your own question.