jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry_ <>
Subject Re: How to declare a variable at thread level and assign it value in one time controller
Date Sat, 05 Dec 2009 16:14:48 GMT

Thank you so much for responding.

Please see attached jmeter file for the structure of the plan. Please use
nightly build to open this plan. In  HTTP Request HTTPClient request
sampler, you will find a filed for Source IP address. I am using that. LoggedOnUser.jmx 

In each thread the user Logs in first in One Time controller. And reads the
value for Source IP from CSV file. Now I want this IP to be used for URL
requests made by this user for rest of the thread loop cycles. (URL's are
also read from file). 

Now I want I store a value of Source IP Address used in a variable when user
login In and use that variable in the Source IP for URL requests made for
that user. 

If a user logs out for some reason, I check for response code 403 and logs
the user back in in If controller. I will reset the value to new Source IP
in the variable again.

But I do not know how to declare and change the value of this variable. 

Any help would be priceless.

Thanks and Regards

mwolfe38 wrote:
> Is each thready going to test a potentially different IP address? If not
> then you could put it in a property.. 
> Can you show like a tree view of what your test plan looks like so we can
> get a better Idea what the problem is..
> Just write it like this:
> -TestPlan
>  - Thread Group
>   - Controller
>    - Sample
>   - Controller
>    - Sample
>  - Thread Group
> ....
> Harry_ wrote:
>> Hi,
>> I have made a test plan in which I login in one time controller  from one
>> IP which is read from csv file (on a machine having multiple IP's) and
>> then I have to fire requests to server from that IP. 
>> But for this I have to store the value of IP in a variable in one time
>> controller and use it outside at the thread level where I have other
>> requests.
>> So how do I  declare a variable at thread level and assign it value in
>> one time controller.
>> And use it at thread level...
>> Regards

View this message in context:
Sent from the JMeter - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message