hello,
this is due to nesting $, see:

- {__V(Var${N})}

in:

- http://jmeter.apache.org/usermanual/functions.html

Regards

On Tuesday, May 21, 2013, [email protected] wrote:

> I think didn't mention that the variable is created the the
> RebularExpression
> extractor and its actual name is accountId_matchNr. and I am using this in
> the Beanshell parameter as ${__Random(1,${acountId_matchNr})} but I get
> this
> exception.
>
>
> jmeter.JMeter: Uncaught exception:  java.lang.NumberFormatException: For
> input string: "${acountId_matchNr}"
>         at
>
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>         at java.lang.Long.parseLong(Long.java:410)
>         at java.lang.Long.parseLong(Long.java:468)
>         at org.apache.jmeter.functions.Random.execute(Random.java:63)
>         at
>
> org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:146)
>         at
>
> org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:120)
>         at
>
> org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:92)
>         at
>
> org.apache.jmeter.testbeans.TestBeanHelper.unwrapProperty(TestBeanHelper.java:129)
>         at
> org.apache.jmeter.testbeans.TestBeanHelper.prepare(TestBeanHelper.java:79)
>         at
>
> org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:206)
>         at
>
> org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:325)
>         at java.lang.Thread.run(Thread.java:662)
>
>
> Some how I think that the variable is not created by the regular expression
> extractor when this beanshell is called. May be there is some preprocessing
> happen and the variable value is substitued and later beanshell is executed
> to do the actual work. But I am not sure though.
>
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/passing-variable-in-Random-method-call-in-Beanshell-tp5716932p5716942.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected] <javascript:;>
> For additional commands, e-mail: [email protected]<javascript:;>
>
>

-- 
Cordialement.
Philippe Mouawad.
Ubik-Ingénierie

UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>

UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>

Reply via email to