You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Miklos Tverdota <tv...@axelero.hu> on 2005/09/01 10:19:16 UTC

Unexpected Behaviour with TestPlan-Level User Defined Variables

Hi,

I have built a small demo program to show how the function 
_StringFromFile works.
This program demonstrates the usage of the variables in beanShell 
assertion too.
This opportunity is useful if somebody will write info in log with the 
current values of the variables

Suppose I need several users with various profiles.
I put the profile for each user in a single line of the csv-file.

The first attempt uses the line one.
The second attempt uses the line two.
The file pointer updated by each reference to a parameter ${usrP_X}.

Unfortunately I need the same profile for several subsequent calls.
This can be achieved if someone sets the checkbox Update Once per 
Interaction User Parameters on the panel User parameters.
Unfortunately the file pointer is still incremented by each reference.
In second iteration Jmeter takes the line 3.

Regards,

Miklos


Re: Unexpected Behaviour with TestPlan-Level User Defined Variables

Posted by Michael Stover <ms...@apache.org>.
You have a top level User Defined Variables config element.  This
element is re-evaluated for every request in it's scope, and this is
reading the string from file and therefore incrementing the reference
for every request.  You can fix this by either 

A) move the User Defined Variables element under the first sampler in
your test (ie the named '/manual/'), or
B)change it to a User Parameters element with the "Update Once per
Iteration" checkmark checked.

-Mike

On Thu, 2005-09-01 at 10:19 +0200, Miklos Tverdota wrote:
> Hi,
> 
> I have built a small demo program to show how the function 
> _StringFromFile works.
> This program demonstrates the usage of the variables in beanShell 
> assertion too.
> This opportunity is useful if somebody will write info in log with the 
> current values of the variables
> 
> Suppose I need several users with various profiles.
> I put the profile for each user in a single line of the csv-file.
> 
> The first attempt uses the line one.
> The second attempt uses the line two.
> The file pointer updated by each reference to a parameter ${usrP_X}.
> 
> Unfortunately I need the same profile for several subsequent calls.
> This can be achieved if someone sets the checkbox Update Once per 
> Interaction User Parameters on the panel User parameters.
> Unfortunately the file pointer is still incremented by each reference.
> In second iteration Jmeter takes the line 3.
> 
> Regards,
> 
> Miklos



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