You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Renou, Stephane" <St...@Genesys.com> on 2007/09/19 18:23:42 UTC
Finding the current loop number
Hello,
I am running a loop early in my test plan and I need to store the
different data of each time I go thru the loop so that later on in the
test plan where I run another time the same loop I can reuse the data
stored previously.
Test plan is so:
Loop x times
Perform some stuff
Loop x times
I was thinking of storing my data as vars.put("data1") vars.put("data2")
etc but I could not find how to know which iteration of the loop I am
currently running.
Is this information available in the pre defined variables somewhere?
Thank you.
Re: Finding the current loop number
Posted by sebb <se...@gmail.com>.
On 19/09/2007, Renou, Stephane <St...@genesys.com> wrote:
> Hello,
>
> I am running a loop early in my test plan and I need to store the
> different data of each time I go thru the loop so that later on in the
> test plan where I run another time the same loop I can reuse the data
> stored previously.
Do you mean you want to store x different data items, and use them again later?
> Test plan is so:
>
> Loop x times
>
> Perform some stuff
>
> Loop x times
>
>
>
> I was thinking of storing my data as vars.put("data1") vars.put("data2")
> etc but I could not find how to know which iteration of the loop I am
> currently running.
>
>
>
> Is this information available in the pre defined variables somewhere?
Not that I know of.
>
> Thank you.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
RE: Finding the current loop number
Posted by "Renou, Stephane" <St...@Genesys.com>.
Thanks the counter worked fine and I build the variable appending the counter value (as I needed to store several values).
-----Message d'origine-----
De : Hari Krishna Dara [mailto:haridara@gmail.com]
Envoyé : mercredi 19 septembre 2007 19:51
À : JMeter Users List
Objet : Re: Finding the current loop number
If you know the count in advance, why not use a Loop Controller with a
Counter as a child? If ${x} is the count, then Loop Controller will have a
count of ${x} and the Counter will have the appropriate range, e.g., from 1
to ${x} (the max doesn't really matter, just make sure it will have enough
range, in case you don't Start with 0 or 1). The Reference Name of the
Counter then will have the current loop count at anytime and you can use
that to form variable names.
-- Hari
On 9/19/07, Renou, Stephane <St...@genesys.com> wrote:
>
> Hello,
>
> I am running a loop early in my test plan and I need to store the
> different data of each time I go thru the loop so that later on in the
> test plan where I run another time the same loop I can reuse the data
> stored previously.
>
> Test plan is so:
>
> Loop x times
>
> Perform some stuff
>
> Loop x times
>
>
>
> I was thinking of storing my data as vars.put("data1") vars.put("data2")
> etc but I could not find how to know which iteration of the loop I am
> currently running.
>
>
>
> Is this information available in the pre defined variables somewhere?
>
>
>
> Thank you.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Finding the current loop number
Posted by Hari Krishna Dara <ha...@gmail.com>.
If you know the count in advance, why not use a Loop Controller with a
Counter as a child? If ${x} is the count, then Loop Controller will have a
count of ${x} and the Counter will have the appropriate range, e.g., from 1
to ${x} (the max doesn't really matter, just make sure it will have enough
range, in case you don't Start with 0 or 1). The Reference Name of the
Counter then will have the current loop count at anytime and you can use
that to form variable names.
-- Hari
On 9/19/07, Renou, Stephane <St...@genesys.com> wrote:
>
> Hello,
>
> I am running a loop early in my test plan and I need to store the
> different data of each time I go thru the loop so that later on in the
> test plan where I run another time the same loop I can reuse the data
> stored previously.
>
> Test plan is so:
>
> Loop x times
>
> Perform some stuff
>
> Loop x times
>
>
>
> I was thinking of storing my data as vars.put("data1") vars.put("data2")
> etc but I could not find how to know which iteration of the loop I am
> currently running.
>
>
>
> Is this information available in the pre defined variables somewhere?
>
>
>
> Thank you.
>
>