Yes, It didn't worked ... I might be missing something but other
beanshell sampler worked.


Ori Marko 
Quality Assurance Engineer 
Praxell Inc.
http://www.praxell.com

-----Original Message-----
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 01, 2007 2:30 PM
To: JMeter Users List
Subject: Re: Use parameter in parameter

Have you tried that?

On 30/09/2007, Ori Marco <[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm not sure what to do exactly.
>
> 1. Create a file "evaluate.bshrc" in bin folder?
> 2. Use ${__BeanShell(evaluateVar("query")} in any sampler?
> 3. Define the property: beanshell.function.init=evaluate.bshrc in 
> jmeter.properties ?
>
> Thanks again
>
> Ori Marko
> Quality Assurance Engineer
> Praxell Inc.
> http://www.praxell.com
>
> -----Original Message-----
> From: sebb [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 25, 2007 2:34 PM
> To: JMeter Users List
> Subject: Re: Use parameter in parameter
>
> Except of course by using BeanShell:
>
> Create a file "evaluate.bshrc" containing:
>
> //-------- cut here ---------
> import org.apache.jmeter.engine.util.CompoundVariable;
> String evaluate(String s){
> CompoundVariable cv = new CompoundVariable(); cv.setParameters(s); 
> return cv.execute(); } String evaluateVar(String v){ return 
> evaluate(vars.get(v)); }
> //--------- cut here --------
>
> Define the property:
>
> beanshell.function.init=evaluate.bshrc
>
> so that the methods are made known to the BeanShell function.
>
> You can then use the function call:
>
> ${__BeanShell(evaluate("string"))}
>
> where string = ${query} - for example.
>
> or
>
>  ${__BeanShell(evaluateVar("query"))}
>
> where query is the name of the variable.
>
> to evaluate the contents of the variable "query".
>
> In both cases, the parameter to the method must be a Java string, 
> which is why the quotes are needed.
>
> The second example works even if the query variable contains 
> double-quotes.
>
> I'll see about adding an evaluate() function to the next release of 
> JMeter.
>
> On 25/09/2007, sebb <[EMAIL PROTECTED]> wrote:
>
> > Sorry, you're right.
> >
> > __V() expects a variable name, not an arbitrary string containing 
> > variable references.
> >
> > I don't think that there's an easy way to do this currently.
> >
> > On 25/09/2007, Ori Marco <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > Still I can't use parameter,because:
> > > When tried to send ${__V(${query})} execute ${${query})} When 
> > > tried to send __V(${query}) execute __V(select * from test where
> > > card=${card})
> > >
> > > It seems that __V support only full parameter name and not string 
> > > with parameters.
> > >
> > > Thanks
> > >
> > > Ori Marko
> > > Quality Assurance Engineer
> > > Praxell Inc.
> > > Mobile: 0524-455-177
> > > Office:03-6126060 Ext 612
> > > Fax: 03-6126066
> > > http://www.praxell.com
> > >
> > > -----Original Message-----
> > > From: sebb [mailto: [EMAIL PROTECTED]
> > > Sent: Tuesday, September 25, 2007 12:04 PM
> > > To: JMeter Users List
> > > Subject: Re: Use parameter in parameter
> > >
> > > On 25/09/2007, Ori Marco <[EMAIL PROTECTED] > wrote:
> > >
> > > > Hi
> > > >
> > > > I'm sorry , but I still have a problem, For modularity I need to

> > > > put all selects (for example) in same file with parameters as 
> > > > card
>
> > > > and user E.g in file : select * from test where card=${card} And

> > > > to use this select in my jmx where card/user parameter is taken 
> > > > from another file (csv/user parameters)
> > >
> > >
> > > It would have been helpful if you had explained this initially ;-)
> > >
> > >
> > >
> > > > How can this be accomplish?
> > >
> > >
> > > See:
> > >
> > > http://jakarta.apache.org/jmeter/usermanual/functions.html#__V
> > >
> > > Instead of using
> > >
> > > ${query}
> > >
> > > on the JDBC sampler,
> > >
> > > try using
> > >
> > > ${__V(${query})}
> > >
> > >
> > > > Thanks
> > > >
> > > > Ori Marko
> > > > Quality Assurance Engineer
> > > > Praxell Inc.
> > > >
> > > > -----Original Message-----
> > > > From: sebb [mailto: [EMAIL PROTECTED]
> > > > Sent: Wednesday, August 29, 2007 11:34 PM
> > > > To: JMeter Users List
> > > > Subject: Re: Use parameter in parameter
> > > >
> > > > JMX files can include variable references (and definitions, e.g.
> > > > UDV or User Parameters).
> > > >
> > > > Variables can be defined in files and read using
> > > >
> > > > http://jakarta.apache.org/jmeter/usermanual/component_reference.
> > > > ht
> > > > ml#C
> > >
> > > > SV
> > > > _Data_Set_Config
> > > >
> > > >
> > > > Please also read the JMeter FAQ
> > > >
> > > > http://wiki.apache.org/jakarta-jmeter/JMeterFAQ
> > > >
> > > > particularly:
> > > >
> > > > http://wiki.apache.org/jakarta-jmeter/JMeterFAQ#head-87f846dad28
> > > > fd
> > > > 6b2a
> > > > d5
> > > > eb0d44d527d572f810653
> > > >
> > > > http://wiki.apache.org/jakarta-jmeter/JMeterFAQ#head-81e8fdc6d08
> > > > e5
> > > > b574
> > > > a0
> > > > 6556f597f788df8ed12fe
> > > >
> > > > On 29/08/2007, Ori Marco <[EMAIL PROTECTED]> wrote:
> > > > > Hi
> > > > >
> > > > > I can't get parameters from included jmx file.
> > > > > Isn't there another way or how can I get the parameters from 
> > > > > another
> > >
> > >
> > > > > jmx file?
> > > > >
> > > > > Thanks
> > > > >
> > > > > Ori Marko
> > > > >
> > > > > Quality Assurance Engineer
> > > > >
> > > > > Praxell Inc.
> > > > >
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Ronan Klyne [mailto:[EMAIL PROTECTED]
> > > > > Sent: Wednesday, August 29, 2007 2:28 PM
> > > > > To: JMeter Users List
> > > > > Subject: Re: Use parameter in parameter
> > > > >
> > > > > Ori Marco wrote:
> > > > > > Hi
> > > > > >
> > > > > > For modularity I need to put all parameters in same source 
> > > > > > and
>
> > > > > > not
> > >
> > > > > > per
> > > > >
> > > > > > jmx file.
> > > > > > E.g. for reusing random parameter as 
> > > > > > random=${__Random(1,5000000,n)}
> > > >
> > > > > > in all jmx files.
> > > > > > I need to get parameters from other source than inside jmx 
> > > > > > file ( instead of adding component per jmx - to use 1
> > > > > > variable)
> > > > > >
> > > > >
> > > > > Look up the Include Controller 
> > > > > (http://jakarta.apache.org/jmeter/usermanual/component_referen
> > > > > ce
> > > > > .htm
> > > > > l#
> > > > > In
> > > > > clude_Controller)
> > > > > - I think this will do what you need (although I've not done 
> > > > > it myself)...
> > > > >
> > > > >        # r
> > > > >
> > > > > --
> > > > > Ronan Klyne
> > > > > Business Collaborator Developer
> > > > > Tel: +44 (0)870 163 2555
> > > > > [EMAIL PROTECTED]
> > > > > www.groupbc.com
> > > > >
> > > > > --------------------------------------------------------------
> > > > > --
> > > > > ----
> > > > > - To unsubscribe, e-mail:
> > > > > [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
> > > > > [EMAIL PROTECTED]
> > >
> > > > >
> > > > >
> > > > > --------------------------------------------------------------
> > > > > --
> > > > > ----
> > > > > - To unsubscribe, e-mail:
> > > > > [EMAIL PROTECTED]
> > >
> > > > > For additional commands, e-mail:
> > > > > [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > > ----------------------------------------------------------------
> > > > --
> > > > --- To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > > > ----------------------------------------------------------------
> > > > --
> > > > --- To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: 
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail: 
> > > [EMAIL PROTECTED]
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to