You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Michael R. Wolfe" <mi...@vontu.com> on 2003/12/06 02:41:30 UTC

User parameter as a loop counter works in the first iteration but not again

I have:

. Loop Controller
  . Simple controller
    . User Parameter
	Name: NumItems User1: CSVRead(..)
      And some other params, including one doing CSVRead(..,next())
    . Loop Controller
	Loop Count: ${NumItems}

So that for each pass through my outer loop I want the number of
iterations of the inner loop to be parameterized by the contents of the
CSV file.

The behavior in 1.9.1 is that the first time through the loop it works
fine (I tried it with a non-1 value) but every subsequent pass through
uses the NumItems retrieved the first time instead of using the next one
in the file (all the other params retrieved from that file get applied
fine).

Questions:
. Is it possible to use a User Parameter as a loop counter?
. If not, how come it does work the first time, but not the second or
beyond?

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


Re: User parameter as a loop counter works in the first iteration but not again

Posted by Jordi Salvat i Alabart <js...@atg.com>.
A mistake we all make when starting on JMeter is to view the test plan 
as a script -- it's not. The behaviour you describe is not very surprising.

Still, it could be interesting to have your specific case work: if 
you've needed this, other people may need it too. Could you please file 
a bug report?

-- 
Salut,

Jordi.

En/na Michael R. Wolfe ha escrit:
> I have:
> 
> . Loop Controller
>   . Simple controller
>     . User Parameter
> 	Name: NumItems User1: CSVRead(..)
>       And some other params, including one doing CSVRead(..,next())
>     . Loop Controller
> 	Loop Count: ${NumItems}
> 
> So that for each pass through my outer loop I want the number of
> iterations of the inner loop to be parameterized by the contents of the
> CSV file.
> 
> The behavior in 1.9.1 is that the first time through the loop it works
> fine (I tried it with a non-1 value) but every subsequent pass through
> uses the NumItems retrieved the first time instead of using the next one
> in the file (all the other params retrieved from that file get applied
> fine).
> 
> Questions:
> . Is it possible to use a User Parameter as a loop counter?
> . If not, how come it does work the first time, but not the second or
> beyond?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 


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