You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sebb <se...@gmail.com> on 2006/12/01 00:26:48 UTC

Re: Interleave controllers and User defined variables

On 30/11/06, Kyle Schmitt <ky...@gmail.com> wrote:
> Another probably newb question ....
>
> Is there a way to get user defined variables to work inside of
> interleave controllers? I tried plain User Defined Variables inside of
> the interleave, and when that didn't work, I tried using simple
> controllers to hold them, still no go.
>
> Some details:
>
> I've got a loop controller with an interleave and samplers inside of
> it.  I wanted to put variables in the interleave for the samplers to
> use...but all the ways I've tried only use the last value.
> ascii graphics to try and explain what I'm doing..
>
>
> Loop (4 times)
>
> --Interleave
> ----User Defined Variable 1
> ------area=hi
> ------index=1
> ----User Defined Variable 2
> ------area=thing
> ------index=2
> ----User Defined Variable 3
> ------area=something
> ------index=3
> ----User Defined Variable 4
> ------area=other
> ------index=4
> --end Interleave
>
> --Sampler http://webapp.aspx?select=${index}
> ----response assertion contains ${area}
> --end Sampler
>
> End Loop
>

Two problems here:

* The Interleave controller is intended for use with Samplers, or
samplers nested in other controllers. Ultimately there must be a
sampler to execute. When a sampler is found, the other elements are
processed as follows:

http://jakarta.apache.org/jmeter/usermanual/test_plan.html#executionorder

* UDVs are processed according to the level in the tree, not the position:

http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping_rules

One possible way to do the same would be to use a CSV DataSet with
four lines, each with two columns for the index and area variables.

The manual could be clearer on this ...

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