Quantcast

Jmeter Header Manager

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Jmeter Header Manager

Paprenelle
This post has NOT been accepted by the mailing list yet.
Hello,

(Sorry for my bad english because I'm a french student :/)

So, I'try to make an functional test, I make an authentication with a login and a password and the result of the request send me a token, after I make an another request when I need to use the token but I' will use the token in the header. I retrieve the token and reuse it on an Header Manager and when I try to launch the test, I've an error 401 " Unauthorized". My problem is : How do I use the token in the header manager


Thanks for your answers, and sorry for my english

Paprenelle.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jmeter Header Manager

glinius@live.com
This post has NOT been accepted by the mailing list yet.
If you have extracted the token from the first response into a JMeter Variable called i.e. token - you can refer it later in the script as ${token} where required.



Another way of accessing JMeter Variables is using __V() function. See Functions and Variables User Manual section for more information on them.

If you still experience issues with login it might be the case you are missing something obvious. For the first steps I would recommend recording the same test scenario several times using HTTP(S) Test Script Recorder and see what values are different and whats need to be done to handle them. Another option is using BlazeMeter Proxy Recorder (Mobile And Web) where you can export your tests in SmartJMX mode with automatic correlation of dynamic parameters applied.

Loading...