jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guruprasad <guruprasa...@gmail.com>
Subject Re: ForEach loop iteration value
Date Sun, 17 Jul 2016 11:48:56 GMT
I was actually using the __counter method in the samplers belonging to the same thread group
without knowing that all the counter values would evaluate to the same number & that's
not intended. Are you suggesting me to set a new counter using beanshell and use it??

Regards
Guruprasad R

On ಜುಲೈ 16, 2016, at 12:13 ಪೂರ್ವಾಹ್ನ, Deepak Shetty <shettyd@gmail.com>
wrote:

>> If I make use of counter function, I might have to use it at other places
> as well in the same thread, which would hold the same value. That would not
> result in forming proper requests at other places.
> Im not sure what you mean - if you need the current value use the variable
> name of the counter, if you want to increment the value use the function.
> 
>> On Thu, Jul 14, 2016 at 9:45 PM, Guruprasad <guruprasad81@gmail.com> wrote:
>> 
>> Right.. My request body needs the iteration count.
>> If I make use of counter function, I might have to use it at other places
>> as well in the same thread, which would hold the same value. That would not
>> result in forming proper requests at other places.
>> 
>> Finally using while loop instead of foreach.. Thanks for your help..
>> 
>> Regards,
>> Guruprasad
>> 
>>> On ಜುಲೈ 15, 2016, at 02:49 ಪೂರ್ವಾಹ್ನ, Deepak Shetty
<shettyd@gmail.com>
>> wrote:
>>> 
>>> hi
>>> you probably need to add
>>> http://jmeter.apache.org/usermanual/functions.html#__counter if you
>> want to
>>> know which iteration you are on.
>>> However the for each is generally meant for situations where you dont
>> need
>>> to know the iteration value
>>> 
>>> On Thu, Jul 14, 2016 at 2:56 AM, Guruprasad R <guruprasad81@gmail.com>
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I am using foreach controller and not really able to find the iteration
>>>> value of the loop.
>>>> 
>>>> Ex: The foreach might run for 10 iterations and if its current iteration
>>>> value is 5, how would i be able to extract the value 5??
>>>> 
>>>> Regards,
>>>> Guruprasad R
>>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>> 
>> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message