jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <p.moua...@ubik-ingenierie.com>
Subject Re: [Q] How to set token_id on each thread.
Date Tue, 22 Jan 2013 09:10:11 GMT
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 <hiroysato@gmail.com> 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: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message