Hello Philippe and Deepak Thank you for your reply.
I could set token_id. 2013/1/23 Deepak Shetty <[email protected]>: > Just to expand a little bit > >> If I extract token_id, Is it thread dependent or not? > Variables are scoped to a thread. i.e. each thread can have its own value > and manipulate it without affecting any other thread > >> How to set it dynamically? > Use any extractor as a child of the Sampler that is returning this token id > in its response. For e.g. if you use regular expression extractor. the > reference name is the name of the variable so you could say token_id. > > When you want to use it in the next request you use something like > ${token_id} to get the value > >>Do I have to use Beanshell? > For your use case, no. > > regards > deepak > > > On Tue, Jan 22, 2013 at 1:10 AM, Philippe Mouawad < > [email protected]> wrote: > >> Hello, >> Just use a Regular Expression Extractor, it will create a var which is >> local to each thread. >> If you set reference name to tokenid, you will be then able to use it as >> ${tokenid} >> >> -- >> Regards >> Philippe M. >> >> UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie> >> >> UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/> >> >> >> On Tue, Jan 22, 2013 at 7:46 AM, Hiroyuki Sato <[email protected]> >> wrote: >> >> > Dear members. >> > >> > I'm newbie about JMeter. >> > >> > Question. >> > >> > I would like to set token_id on eatch thread after http authentication. >> > It is returned after authentication. >> > >> > How to set it dynamically? >> > >> > If I extract token_id, Is it thread dependent or not? >> > >> > It seems variable not thread local, that's why I want to set it >> > dynamically. >> > Please correct if my understanding is wrong. >> > >> > Senario >> > >> > 1) Auth user on Authentication page 1. >> > >> > User: user${__threadNum} >> > Pass: user${__threadNum} >> > >> > After authentication, HTTP server return return token_id in body. >> > The format is >> > >> > >> > >> tokenid=AQIC5wM2LY4Sfcz8SAJTEePpFXtgdh14TyD1GO7boJnclyI.*AAJTSQACMDMAAlNLAAoxODU2MTU2NjI0AAJTMQACMDE.* >> > >> > >> > 2) I would like to set token_id on each thread. >> > >> > I'm not sure how to set it on each thread. >> > >> > Can I set it's value as variable name as >> > ${__V(token_id${__threadNum})}? >> > >> > 3) send next request to page2 with token_id >> > >> > I'm not sure how to get No2. value. >> > >> > Can I get it with ${__V(token_id${__threadNum})}? >> > >> > Do I have to use Beanshell? >> > >> > Sincerely. >> > >> > >> > >> > -- >> > Hiroyuki Sato >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [email protected] >> > For additional commands, e-mail: [email protected] >> > >> > >> -- Hiroyuki Sato --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
