You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Gary K. Avery" <ga...@verizon.net> on 2007/01/03 16:45:44 UTC

user parameters pre-processor JavaScript function

hello,

i seem to have run into a snag and not sure whether it is a timing
restriction or something else.

i have a thread group with a CSV Data Set Config element which
is reading in from a file and assigning some variables (e.g., A, B, C).
that seems to be working fine.

i then have a User Parameters Pre-Processor element immediately following
the config element which is trying to perform arithmetic on two of the 
variables, e.g.:
      ${__javaScript(${A} + ${B})}

however, this is not working.
works fine if the values are static numerics or even other variables 
defined in
an earlier User Defined Variables config element.  but, not the 
pre-processor element.

why??

thanks in advance.

gary avery

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


Re: user parameters pre-processor JavaScript function

Posted by sebb <se...@gmail.com>.
OK, thanks for letting us know.

Now just need to find out why it is behaving like that, and whether it
is accidental or by design - and then document it...

On 03/01/07, Gary K. Avery <ga...@verizon.net> wrote:
> that worked.
> thanks!
>
>
> sebb wrote:
> > Odd - looks like the CSV Dataset has to be AFTER the User Parameters.
> >
> > Not yet sure if this is a bug or a deliberate feature...
> >
> > Anyway, try swapping them and see if this helps.
> >
> > On 03/01/07, Gary K. Avery <ga...@verizon.net> wrote:
> >> hello,
> >>
> >> i seem to have run into a snag and not sure whether it is a timing
> >> restriction or something else.
> >>
> >> i have a thread group with a CSV Data Set Config element which
> >> is reading in from a file and assigning some variables (e.g., A, B, C).
> >> that seems to be working fine.
> >>
> >> i then have a User Parameters Pre-Processor element immediately
> >> following
> >> the config element which is trying to perform arithmetic on two of the
> >> variables, e.g.:
> >>      ${__javaScript(${A} + ${B})}
> >>
> >> however, this is not working.
> >> works fine if the values are static numerics or even other variables
> >> defined in
> >> an earlier User Defined Variables config element.  but, not the
> >> pre-processor element.
> >>
> >> why??
> >>
> >> thanks in advance.
> >>
> >> gary avery
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
>
> ---------------------------------------------------------------------
> 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


Re: user parameters pre-processor JavaScript function

Posted by "Gary K. Avery" <ga...@verizon.net>.
that worked.
thanks!


sebb wrote:
> Odd - looks like the CSV Dataset has to be AFTER the User Parameters.
>
> Not yet sure if this is a bug or a deliberate feature...
>
> Anyway, try swapping them and see if this helps.
>
> On 03/01/07, Gary K. Avery <ga...@verizon.net> wrote:
>> hello,
>>
>> i seem to have run into a snag and not sure whether it is a timing
>> restriction or something else.
>>
>> i have a thread group with a CSV Data Set Config element which
>> is reading in from a file and assigning some variables (e.g., A, B, C).
>> that seems to be working fine.
>>
>> i then have a User Parameters Pre-Processor element immediately 
>> following
>> the config element which is trying to perform arithmetic on two of the
>> variables, e.g.:
>>      ${__javaScript(${A} + ${B})}
>>
>> however, this is not working.
>> works fine if the values are static numerics or even other variables
>> defined in
>> an earlier User Defined Variables config element.  but, not the
>> pre-processor element.
>>
>> why??
>>
>> thanks in advance.
>>
>> gary avery
>>
>> ---------------------------------------------------------------------
>> 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
>
>

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


Re: user parameters pre-processor JavaScript function

Posted by sebb <se...@gmail.com>.
Odd - looks like the CSV Dataset has to be AFTER the User Parameters.

Not yet sure if this is a bug or a deliberate feature...

Anyway, try swapping them and see if this helps.

On 03/01/07, Gary K. Avery <ga...@verizon.net> wrote:
> hello,
>
> i seem to have run into a snag and not sure whether it is a timing
> restriction or something else.
>
> i have a thread group with a CSV Data Set Config element which
> is reading in from a file and assigning some variables (e.g., A, B, C).
> that seems to be working fine.
>
> i then have a User Parameters Pre-Processor element immediately following
> the config element which is trying to perform arithmetic on two of the
> variables, e.g.:
>      ${__javaScript(${A} + ${B})}
>
> however, this is not working.
> works fine if the values are static numerics or even other variables
> defined in
> an earlier User Defined Variables config element.  but, not the
> pre-processor element.
>
> why??
>
> thanks in advance.
>
> gary avery
>
> ---------------------------------------------------------------------
> 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