>knowing that all the counter values would evaluate to the same number & that's not intended. http://jmeter.apache.org/usermanual/functions.html#__counter *Multiple __counter function calls in the same iteration won't increment the value further. *
>Are you suggesting me to set a new counter using beanshell and use it?? Im not entirely sure I understand your question - If you want to track which iteration you are in , in a ForEach Loop , (your original question ) the counter should suffice - if you want incremented numbers within the same loop then possibly you could use something like intSum (add a fixed value to the counter variable ) or like you say track it yourself using beanshell On Sun, Jul 17, 2016 at 4:48 AM, Guruprasad <[email protected]> wrote: > 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 <[email protected]> > 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 <[email protected]> > 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 <[email protected] > > > >> 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 <[email protected]> > >>> 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: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
